im trying to use the jquery fullcalendar. The event data comes from the server using JSON. My page has a dropdown element and the fullcalendar div.
What i need is to
Finally it worked with the following code:
$(document).ready(function() {
loadCalendar();
$('#siteSelect').change(function(){
var selectedSite = $('#siteSelect').val();
var events = {
url: '/myfeed2',
type: 'POST',
data: {
siteid: selectedSite
}
}
$('#calendar').fullCalendar('removeEventSource', events);
$('#calendar').fullCalendar('addEventSource', events);
});
});