I'm trying to select calendar event titles that have a specific word and use this to change the background colour of the event.
Please see my code below. This changes all events to have the background colour of red even if event title doesn't contain the word 'Test'. I've even changed 'Test' to 'uhrguqhergoieqhrgeurgherogih' but it still changes everything.
Unfortunately I can't see anything similar on SO so hopefully one of you could help me out please! :)
Thanks in advance!
$(window).on('load', function() {
if($(".fc-event-title:contains('Test')"))
{
$('.fc-event').css('background-color', 'red');
}
});