Present in both answers;Present only in the new answer;Present only in the old answer;
You can select random item by class name using jquery method `eq()` see the example bellow. var len = $(".class").length var random = Math.floor( Math.random() * len ) + 1; $(".class").eq(random).click();
You can select random item by class name using jquery method `eq()` see the example bellow. var len = $(".someClass").length; var random = Math.floor( Math.random() * len ) + 1; $(".someClass").eq(random).css("background-color", "yellow");
Present in both answers;Present only in the new answer;Present only in the old answer;