Last active
September 24, 2015 15:25
-
-
Save DenimTornado/0596375b4c2e9def372d to your computer and use it in GitHub Desktop.
Colorised every third day in Superjob.ru calendar in 2015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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