Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
FullCalendar alternate calendar colors.
//Globla variable outside of all functions
var altColor = 1;
//Global function
function isEven(n) {
return n % 2 == 0;
//This goes inside the full calendar call
eventRender: function(event, element) {
if(isEven(altColor)) {
$(element).css("background-color", "red");
else {
$(element).css("background-color", "blue");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment