Skip to content

Instantly share code, notes, and snippets.

@freshyill
Created May 22, 2013 15:46
Show Gist options
  • Save freshyill/5628616 to your computer and use it in GitHub Desktop.
Save freshyill/5628616 to your computer and use it in GitHub Desktop.
$(function(){
var list = $("ul li").toArray();
var elemlength = list.length;
var randomnum = Math.floor(Math.random()*elemlength);
var randomitem = list[randomnum];
$(randomitem).css("display", "block");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment