Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery Fullcalendar回调ajax不起作用_Jquery_Ajax_Calendar_Fullcalendar - Fatal编程技术网

Jquery Fullcalendar回调ajax不起作用

Jquery Fullcalendar回调ajax不起作用,jquery,ajax,calendar,fullcalendar,Jquery,Ajax,Calendar,Fullcalendar,我正在尝试从中使用jquery完整日历 但我在实现事件数据时遇到了一个问题: $('#calendar').fullCalendar({ events: function(start, end, callback) { $.ajax({ url: 'myxmlfeed.php', dataType: 'xml', data: { // our hypotheti

我正在尝试从中使用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控制台,然后他们说“回调不是一个函数”。这是什么问题?我怎样才能返回数据呢?

那么什么是
callback
<代码>控制台日志(回调)你的整个例子是什么样子的,你能摆弄一下吗?另外,请提供一个xml提要的示例。我是从中找到的,但我不知道如何使用它。我运行了这个示例,但它不起作用。你能告诉我它是怎么工作的吗?