Created
June 26, 2014 12:39
-
-
Save digiltd/8f2203b760466266a38a to your computer and use it in GitHub Desktop.
Loop through and add a random background-color (David Merfiel's randomColor.js) css property to selected element(s)
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
// ## Description | |
// Loop through and adds a random background-color css property to selected element(s) | |
// ## Requirements | |
// https://github.com/davidmerfield/randomColor | |
$(document).ready(function() { | |
$(".rand-bg-color").each(function() { | |
console.log('this ' + this); | |
$(this).css("background-color", randomColor({ | |
luminosity: 'dark' | |
})); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment