Show/hide image in each list individually with same class I have a list of images that are used as links and at the bottom of each image there is another image to show/hide. So far all the images show at the same time because they have the same class.

Is there any way to get around that? I don't know how to give them all the unique ID.

 &lt;div id="nav"&gt;
    &lt;ul&gt;
        &lt;li id="one" &gt;&lt;a href="#"&gt;&lt;img src="mikesfamilyborder.png" class="first" /&gt;&lt;p&gt;&lt;img src="mikesfamilybordername.png" class="name"/&gt;&lt;/p&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li id="two"&gt;&lt;a href="#" &gt;&lt;img src="bradsfamilyborder.png" class="first" /&gt;&lt;p&gt;&lt;img src="bradsfamilyname.png" class="name"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
        &lt;li id="three"&gt;&lt;a href="#" &gt;&lt;img src="brennerfamilyborder.png" class="first"  /&gt;&lt;p&gt;&lt;img src="ryanbfamilyname.png" class="name"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
        &lt;li id="four"&gt;&lt;a href="#" &gt;&lt;img src="ryanfamilyborder.png" class="first" /&gt;&lt;p&gt;&lt;img src="ryanlfamilyname.png" class="name"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
        &lt;li id="five"&gt;&lt;a href="#" &gt;&lt;img src="missydadfamilyborder.png" class="first" /&gt;&lt;p&gt;&lt;img src="lackeysname.png" class="name"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
        &lt;li id="six"&gt;&lt;a href="#" &gt;&lt;img src="libbyfamilyborder.png" class="first" /&gt;&lt;p&gt;&lt;img src="libbysname.png" class="name"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;p&gt; Click Picture for Family page&lt;/p&gt;
&lt;/div&gt;    


JavaScript:

$('.name').hide();

$(".first").hover(function() {
    $(".name").stop().show();

}, function() {
    $(".name").stop().hide();
});
You need to find the .name item that is in the same block of HTML as the one being hovered.  One way to do that is to go up the parent chain from the one begin hovered to get the li tag and then use .find() from thereto find that .name item in that block.  You can use this code to do that:

$('.name').hide();

$(".first").hover(function() {
    $(this).closest("li").find(".name").stop(true).show();
}, function() {
    $(this).closest("li").find(".name").stop(true).hide();
});