Skip to content

Instantly share code, notes, and snippets.

@thedom85
Last active August 29, 2015 14:18
Show Gist options
  • Save thedom85/9cc74835655bc7367077 to your computer and use it in GitHub Desktop.
Save thedom85/9cc74835655bc7367077 to your computer and use it in GitHub Desktop.
JQuery_ColorRandom_HtmlComponents
var colors = [ "blue","blue", "red", "yellow", "green", "grey" ];
$("*").find("*").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