var rand = Math.floor(Math.random()*10);
$('.class').eq(rand).click();
Math.random() gets you a pseudo-random number between 0 and 1, so multiplying it by 10 and rounding it down gets you 0 to 9. .eq() is 0 indexed, so this will get you a random jQuery element out of the 10 you have.