1
fullcalendar一个函数抛出一个错误:类型错误:T(...)上不上fullcalendar
TypeError: t(...).on is not a function fullcalendar.min.js:8:11264
这是我的脚本/ CSS包括:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css" rel="stylesheet" type="text/css"/>
<link href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.print.css " rel="stylesheet" type="text/css"/>
这是在这里我想用fullcalendar页:
<script>
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
// put your options and callbacks here
})
});
</script>
非常基本的,我只是用代码来自文档页面。所以我的猜测是我对标签做了一些错误。
编辑:我更改为使用非缩小版fullcalendar。 错误信息更改为:
TypeError: $(...).on is not a function fullcalendar.js:6912:2
当我点击这个错误它显示:
$(document).on('mousedown', this.documentMousedownProxy);
在功能:
bindGlobalHandlers: function() {
$(document).on('mousedown', this.documentMousedownProxy);
},
使用插件的非缩小版来获得更好的错误消息。 – 2015-04-01 14:33:13
但即使没有这个,错误显然是$ .fn.on是未定义的,这是与您正在使用的jQuery版本预期的。升级jquery,或降级插件。 – 2015-04-01 14:38:27
我已更改为非缩小版本。 我将升级jquery进行测试。 – 2015-04-01 14:40:28