I'm using fullcalendar to display event data via json
It's set to refresh events every 10 seconds with the following
/* Reload the calendar */
window.setInterval(function(){
$('#calendar').fullCalendar('refetchEvents');
}, 100000);
and this works fine.
I have since used the loading element on fullcalendar to show a 'loader' when the calendar is doing something using the following
loading: function( isLoading, view ) {
if(isLoading) {// isLoading gives boolean value
$('#loader').addClass('__loading');
} else {
$('#loader').removeClass('__loading');
}
}
This also works fine.
However having a loader pop up every 10 seconds can be annoying.
What is the best way to keep the timeout refresh (so that uers can see up to date event data without refreshing the physical page) but prevent the loader from showing ONLY on the timeout event?