Created
April 29, 2015 17:33
-
-
Save kyleridolfo/845c59859e91a0620131 to your computer and use it in GitHub Desktop.
Random background colors
This file contains hidden or 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
// assigns random background color to help with layout. | |
$(".target").each(function() { | |
var hue = 'rgb(' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ')'; | |
$(this).css("background-color", hue); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment