This is how I'm using the plugin:
jQuery( document ).ready( function() {
jQuery('#booking-calendar').fullCalendar({
header: {
left: 'prev,next',
center: 'title',
right: 'month,basicWeek,basicDay'
},
editable: true,
events: '<?php echo get_template_directory_uri() ?>/bookings-feed.php'
});
jQuery( '#apartment-selector' ).change( function() {
apartment = jQuery( this ).val()
jQuery('#booking-calendar').fullCalendar( 'removeEvents' )
jQuery('#booking-calendar').fullCalendar( 'addEventSource', {
url: '<?php echo get_template_directory_uri() ?>/bookings-feed.php',
type: 'POST',
data: {
apartment : apartment
}
})
})
})
And this is how it looks:
As you can see it's a bit difficult to track when an event starts and ends, so I was thinking of changing the color of each event.
The problem here is that each event might be split in different weeks (like in the example) and each week has a different DOM event (which makes sense) and they don't have any related class,
How can I color each event differently?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…