Created
November 14, 2012 14:37
-
-
Save bibliotechy/4072483 to your computer and use it in GitHub Desktop.
winners now charlie sheened
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.append('<img src="http://cdn.androidblip.com/icn/com_jasonbuehler_charlieSheen____132896.png" />'); | |
count += proposals.length; | |
} | |
else if (count + proposals.length == 20 && done == false){ | |
proposals.append('<img src="http://cdn.androidblip.com/icn/com_jasonbuehler_charlieSheen____132896.png" />'); | |
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