我正在尝试使用http://arshaw.com/fullcalendar中的jquery完整日历 但是当我实现事件数据时我遇到了问题:
$('#calendar').fullCalendar({
events: function(start, end, callback) {
$.ajax({
url: 'myxmlfeed.php',
dataType: 'xml',
data: {
// our hypothetical feed requires UNIX timestamps
start: Math.round(start.getTime() / 1000),
end: Math.round(end.getTime() / 1000)
},
success: function(doc) {
var events = [];
$(doc).find('event').each(function() {
events.push({
title: $(this).attr('title'),
start: $(this).attr('start') // will be parsed
});
});
callback(events);
}
});
}
});
但日历不会呈现任何内容。我检查了Firefox和Chrome控制台,然后他们说“回调不是功能”。这是什么问题?我怎样才能返回数据?