编程语言
首页 > 编程语言> > JavaScript-TypeError:document.on不是函数

JavaScript-TypeError:document.on不是函数

作者:互联网

ROR新手在这里.我试图在Ubuntu 12上使用FullCalendar和ROR 3.2.11.但是,它不在我的应用程序中.我安装了Firebug,看是否有JavaScript错误,并且有2:

TypeError: document.on is not a function   <location rails.js:128>
TypeError: $(...).fullCalendar is not a function   <location calendar.js:48>

我不明白错误的含义.请记住,我没有编写这些JavaScript,所以我不理解它们.

希望遇到此错误和解决方案的人可以提供帮助.

解决方法:

$(document).on()是jQuery构造(请参见http://api.jquery.com/on/). $(…).fullCalendar()也闻起来像一个jQuery插件.在页面的前面引用jQuery(请参阅https://developers.google.com/speed/libraries/devguide#jquery),它应该会亮起.

标签:fullcalendar,javascript,ruby-on-rails
来源: https://codeday.me/bug/20191031/1975248.html