Well, if I have an html document that looks something like this:
<div class='item'> ... </div>
<div class='item'> ... </div>
<div class='item'> ... </div>
<div class='item'> ... </div>
I know that I iterate over them, performing
$('.item').each
But what if I already know that I want to do something with the second? Is there any syntax similar to:
$('.item')[2]
which can be used as a selector? i.e. I would like to:
$('.item')[2].css('display','block');
Maybe or not? :)
source
share