[英]Uncaught TypeError: boolean is not a function on ajax call in fullcalendar
i have a fullcalendar working on my app and i added the following method to filter results by user: 我在我的应用程序上有一个全日历工作,我添加了以下方法来按用户过滤结果:
function filter_by_provider(selected_provider) {
$('#calendar').fullCalendar( 'removeEvents' );
$('#calendar').fullCalendar( 'addEventSource', function(start, end, callback) {
$.getJSON(source, function(data){
var eventsToShow = [];
for(var i=0; i<data.length; i++){
if(data[i].provider == selected_provider || selected_provider == ""){
eventsToShow.push(data[i]);
};
};
callback(eventsToShow); //here's the Error
});
});
};
The thing is callback doesnt seem to be working and i keep getting this Error on that line: 事情是回调似乎不起作用,我一直在那条线上收到此错误:
Uncaught TypeError: boolean is not a function
Could it be that jquery is not properly installed? 可能是jquery安装不正确吗? Am i missing something?
我想念什么吗?
I'd appreciate any help. 我将不胜感激。 Thanks in advance.
提前致谢。
检查回调对象的类型,它看起来像您的callback = true或false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.