AllramEst
AllramEst

Reputation: 1449

execute function after Fullcalendar eventAfterAllRender

I want to execute a function after I have given the Fullcalendar a new source and it has rerendered. There is a way to manipulate the calendar dynamically. But eventAfterAllRender dont seem to be supported. My Code:

            jQuery('#calendar').fullCalendar('removeEvents');
            jQuery('#calendar').fullCalendar('addEventSource', items);
            jQuery('#calendar').fullCalendar('rerenderEvents');
            jQuery('#calendar').fullCalendar('gotoDate', firstDayOfWeek);

            jQuery('#calendar').fullCalendar('eventAfterAllRender ', function () {
                if (!$calender.is(':visible')) {
                    $calender.fadeTo(1000, 1);
                }
            });

I get this error message from the above code:

'eventAfterAllRender ' is an unknown FullCalendar method.

If you also feel that I can do all this in a better way, please tell me. I want to learn.

Upvotes: 0

Views: 746

Answers (1)

Marouen Mhiri
Marouen Mhiri

Reputation: 1667

I think your problem is about typo. try this:

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

Upvotes: 1

Related Questions