在Fullcalendar eventAfterAllRender之后触发一个函数

时间:2015-01-21 16:59:55

标签: jquery fullcalendar

我的fullcalendar脚本位于一个单独的文件中,并且已经设置了“eventAfterAllRender”。

现在在另一个js文件中,我尝试触发单击加载页面上的按钮,同一页面上还有一个fullcalendat。

因此,当我运行代码时,在加载时,不会呈现事件。我想要的是拥有像

这样的东西
$("calendar").fullCalendar({
    eventAfterAllRender: function() {$("#button").click();}
})

但是会发生的事情是它覆盖了eventAfterAllRender中已经存在的默认函数,用于我的fullCalendar。

我想要的是在eventAfterAllRenderfullcalendar中扩展$("#button).click()选项  执行eventAfterAllRender中的默认函数后{{1}}。

怎么可能? :)

1 个答案:

答案 0 :(得分:3)

在您的代码中,您有两个错误。

$("calendar").fullCalendar({
    eventAfterAllRender: function(){
        $("#button").click();
    }
});
相关问题