fullcalendar js:用ajax获取更多事件 [英] fullcalendar js: fetching more events with ajax
本文介绍了fullcalendar js:用ajax获取更多事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 fullcalendar ,
如何从同一服务器端获取更多活动,多个网址?
最初的一个工作,我只是想在他们到达时添加额外的事件(ajax)。
I'm using fullcalendar, how can I fetch more events from same server side, multiple urls? The initial one works, I just want to add additional events when they arrive(ajax).
推荐答案
使用Ajax来获取数据,然后动态地添加新的源代码。
You could use Ajax to get the data and then add dynamically the new source
$.ajax({
url: "test.html",
success: function(data){
var source = { events: [
{
title: data.getTitle(),
start: new Date(year, month, day)
}
]};
$('#calendar').fullCalendar( 'addEventSource', source );
}
});
这篇关于fullcalendar js:用ajax获取更多事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文