我有一个简单搜索的jQuery fullcalendar。
search.keyup(function( event ) {
calendar.fullCalendar('refetchEvents');
var keycode = (event.keyCode ? event.keyCode : event.which);
if ( keycode !== 13 ) {
throw ('Script Exit');
}
else{
events = $('#calendar').fullCalendar('clientEvents');
searchValue(events);
}
});
当我按下搜索输入中的任何键时,我都会看到fullcalendar从我的PHP脚本中获取源代码。我该怎么关掉它?
这就是我要做的:
var calendar = $('#calendar').fullCalendar({
header: {
left: 'month',
center: 'title',
right: 'prev, next'
}
// other options...
});
function getCurrEventsArr(calendar) {
var events_arr = new Array();
calendar.fullCalendar('clientEvents', function(event) {
event = "";//code to make any changes to event
events_arr.push(event);
});
return events_arr;
}
search.keyup(function() {
var events = getCurrEventsArr(calendar);
console.log(events);
});