Skip to content

Instantly share code, notes, and snippets.

@DenimTornado
Last active September 24, 2015 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DenimTornado/0596375b4c2e9def372d to your computer and use it in GitHub Desktop.
Save DenimTornado/0596375b4c2e9def372d to your computer and use it in GitHub Desktop.
Colorised every third day in Superjob.ru calendar in 2015
var data = [
{month: 1, reminder: 0},
{month: 2, reminder: 2},
{month: 3, reminder: 1},
{month: 4, reminder: 2},
{month: 5, reminder: 1},
{month: 6, reminder: 2},
{month: 7, reminder: 1},
{month: 8, reminder: 0},
{month: 9, reminder: 1},
{month: 10, reminder: 0},
{month: 11, reminder: 2},
{month: 12, reminder: 0}
];
function colorrizeMonth(data) {
for (var j = 0; j < data.length; j++) {
var cells = $('.ProductionCalendar_grid:nth-child('+data[j].month+') .ProductionCalendar_cells > div');
cells.removeClass('ProductionCalendar_holiday');
for (var i = 0; i < cells.length; i++) {
if ((i % 3) === data[j].reminder) {
$(cells[i]).css({background:'blue'});
}
}
}
}
colorrizeMonth(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment