Skip to content

Instantly share code, notes, and snippets.

@chrisglass
Created March 15, 2013 10:53
Show Gist options
  • Save chrisglass/5168996 to your computer and use it in GitHub Desktop.
Save chrisglass/5168996 to your computer and use it in GitHub Desktop.
Random background color for element using jQuery
$('*').each(function() { $(this).css({background: "#"+((1<<24)*Math.random()|0).toString(16)});});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment