How can I return a random element in jQuery by doing something like $(.class).random.click()?
$(.class).random.click()
So, if .class had 10 links, it would randomly
.class
If you don't want to hard code the number of elements to choose from, this works:
things = $('.class'); $(things[Math.floor(Math.random()*things.length)]).click()