Berdiya Onur Berdiya Onur - 8 months ago 58
jQuery Question

content removedfffff

content removed on my own volition.


You mean like this?

I have condensed the code into one event and changed the way it works (matches ids of multiple image boxes to classes of the links):

$("#leftmenu a").hover(function() {
    $("[id^=img]:not([id=" + $(this).attr("class") + "])").slideUp(250);
    $("#" + $(this).attr("class")).slideDown(250);

I also added 2 more img tags, with IDs that match the classes in the a tags:

<div id="img1">Image here</div>
<div id="img2">Image here</div>
<div id="img3">Image here</div>

    <li> <a class="img1" href="#">Image 1</a></li>
    <li> <a class="img2" href="#">Image 2</a></li>
    <li> <a class="img3" href="#">Image 3</a></li>