38
rated 0 times
[
42]
[
4]
/ answers: 1 / hits: 23471
/ 15 Years ago, thu, november 19, 2009, 12:00:00
How can I select the first 5 random elements
<ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
...
<li>N</li>
</ul>
alert($(li:random).text());
but it takes all random elements. I only want the first 5.
Is there another way to do the same thing?
More From » jquery