JSFiddle - React, Tailwind, and code Playground

by Ian Roberts

JavaScript

if ( $j('#monthViewCalendar').length ) { 
 	$j( ".vevent" ).each(function() { 
		$j(this).addClass( $j( this ).find('.tags > a').text().replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase() ); 
	});
} else if ($j('#month_list').length ) {
 	$j( ".vevent" ).each(function() { 
		$j(this).addClass( $j( this ).find('.tags > a').text().replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase() ); 
	});
} else if ($j('#dayViewCalendar').length ) { 
 	$j( ".vevent" ).each(function() { 
		$j(this).addClass( $j( this ).find('.tags > a').text().replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase() ); 
	});
}