我FullCalendar的jQuery看起来是这样的:jQuery的FullCalendar不解析JSON
$(document).ready(function() {
$('#calendar').fullCalendar({
events: {
url: '/admin/index.php',
type: 'GET',
data: {
m: '1',
e: 'fetchCalEvents'
},
error: function() {
alert('there was an error while fetching events!');
},
color: 'yellow',
textColor: 'black'
}
});
如果我打的测试网址:
http://localhost/admin/index.php?m=1&e=fetchCalEvents
我得到好看的JSON:
[{"id":"13","title":"Test Entry","start":"2013-04-20 04:20:00","end":"2013-04-20 05:20:00","url":"#","allDay":false}]
但加重日历只会弹出:
There was an error while fetching events!
这并没有告诉我很多。有什么方法可以在这个插件上获得更好的错误处理吗?我没有看到文档中的任何内容。任何想法有什么不对?
:(