I am changing the events in FullCalendar (http://arshaw.com/fullcalendar/docs/event_data/) by doing the following:
eventClick: function (event)
{
if ($(this).css('background-color').match(/^(?:green|#fff(?:fff)?|rgba?\(\s*0\s*,\s*255\s*,\s*0\s*(?:,\s*1\s*)?\))$/i)) {
$(this).css('border-color', 'red');
$(this).css('backgroundColor', 'red');
}
else if ($(this).css('background-color').match(/^(?:red|#fff(?:fff)?|rgba?\(\s*255\s*,\s*0\s*,\s*0\s*(?:,\s*1\s*)?\))$/i)) {
$(this).css('border-color', 'blue');
$(this).css('backgroundColor', 'blue');
}
}
But what I find is that once I change an event color (Or even several event colors) and then drag an event to another day, all the events change color back to their original colours.
How can I prevent this??? How can I make the evet persist their color once changed?
event.preventDefault()
– cookie monster