我在使用ajax加载的页面中使用FullCalendar插件。 当页面加载时,我得到的是标题按钮,但是在我点击其中一个按钮(月/周/日)之前,日历本身不会显示。
这是我的代码:
$('#calendar').fullCalendar({
header: { left: 'next,prev, today', center: 'title', right: 'month,basicWeek,basicDay'},
isRTL: true,
height: 540,
events: {
url: "../practice/AjaxJson",
cache: true
},
timeFormat: 'H(:mm)'
});
如果我把这段代码放在一个函数中,并使用设置为1500ms的setTimeout调用它,那就可以了。
对此有更好的解决方案吗?
答案 0 :(得分:0)