新手来了。我正在尝试在Ubuntu12上使用RoR3.2.11的FullCalendar。我已经下载了一个working example,并验证了日历是否显示在示例应用程序中。然而,它不在我的应用程序中。我安装了Firebug来查看是否有任何JavaScript错误,有2个:
TypeError: document.on is not a function <location rails.js:128>
TypeError: $(...).fullCalendar is not a function <location calendar.js:48>
我不明白这些错误是什么意思。请记住,这些JavaScripts不是我写的,所以我不理解它们。
希望遇到这个错误和解决方案的人能提供帮助。
发布于 2013-01-19 18:33:32
$(document).on()
是一个jQuery构造(参见http://api.jquery.com/on/)。$(...).fullCalendar()
闻起来也像一个jQuery插件。在你的页面之前引用jQuery (参见https://developers.google.com/speed/libraries/devguide#jquery),它应该会亮起来。
发布于 2013-11-12 09:48:58
检查您的jquery版本,$(document).on()至少需要1.7版本才能工作。
https://stackoverflow.com/questions/14417049
复制