Looking for an example of how to implement the loading callback.
Here is my code that I am using so far. Just not sure how to use the loading callback.
Do I need to use events as a function or can I add something to the code I am using here?
Thanks
$('#calendar').fullCalendar({
theme: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
events: {
url: 'calendar/ajax.php',
data: {
uid: '<?=$_SESSION[$pageID]['owner_uid']?>',
fbpageid: '<?=$pageID?>'
},
error: function() {
alert('there was an error while fetching events!');
}
},
eventMouseover: function(calEvent,jsEvent) {
xOffset = 10;
yOffset = 10;
var left = (jsEvent.clientX + yOffset);
if ( (jsEvent.clientX + 200 + yOffset) > $(window).width() ){
left = (jsEvent.clientX - 200);
}
$("body").append(calEvent.tooltip);
$("#p_"+calEvent.id)
.css("top",(jsEvent.clientY - xOffset) + "px")
.css("left",left + "px")
.fadeIn("fast");
},
eventMouseout: function(calEvent,jsEvent) {
$("#p_"+calEvent.id).fadeOut("fast");
$("#p_"+calEvent.id).remove();
}
});
Here is an example of how to use the loading callback:
loading: function(bool) {
if (bool)
$('#loading').show();
else
$('#loading').hide();
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With