Created
November 14, 2012 14:04
-
-
Save bibliotechy/4072275 to your computer and use it in GitHub Desktop.
Makes currently winning proposals bada55. Any proposals tied for entry are yellow.
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
count = 0; | |
done = false; | |
$("table.table tbody tr td[class!='election_results_score']").each(function(index){ | |
proposals = $(this).children(); | |
if (count + proposals.length < 20 && done == false) { | |
proposals.css('background-color','#bada55'); | |
count += proposals.length; | |
} | |
else if (count + proposals.length == 20 && done == false){ | |
proposals.css('background-color','#bada55'); | |
count += proposals.length; | |
done = true; | |
} | |
else if (done == false) { | |
//if more than one occupies the last slot, make them a different color, to show they are maybes. | |
proposals.css('background-color','yellow'); | |
done = true; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment