Skip to content

Instantly share code, notes, and snippets.

@jensechu
Created October 26, 2009 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jensechu/218867 to your computer and use it in GitHub Desktop.
Save jensechu/218867 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
var furs = ["#FFFFFF", "#F7941D", "#EBEBEB", "#636363", "#C69C6D", "#A186BE", "395A00", "#FFF220"];
$("#picture img").click(function () {
var choice = Math.floor(Math.random()*furs.length);
$(this).css({ "background-color" : furs[choice] });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment