Last active
August 29, 2015 14:18
-
-
Save thedom85/38eae0e79b26a3c1dea3 to your computer and use it in GitHub Desktop.
JQuery_ColorRandom_HtmlDiv
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 colors = [ "blue","blue", "red", "yellow", "green", "grey" ]; | |
$("*").find("div").each(function() { | |
$(this).css("border-color", colors[(Math.floor(Math.random() * (5 - 1 + 1)) + 1)] ).css("border-style","solid").css("border-width","medium"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment