Possible Duplicate:
jQuery – hide all elements except first one
the html code:
<div class="productimg"><a href="">test</a><a href="">tow</a><a href="">three</a></div>
<div class="productimg"><a href="">test</a><a href="">hide</a><a href="">show</a></div>
................
now, i want to only show the first a in each productimgwhen open the page. i using the follow code. but it hide all the image except the first image.
$('.productimg a').hide()
$('.productimg a:eq(0)').show();
Try this,
Live Demo