hover the li not the img

in your append you are not appending to the li you are trying to append to the img which shouldn't work



kknaru wrote:

i have some images loaded viad load method, something like this:

<ul>
   <li><img src="" alt="" /></li>
   <li><img src="" alt="" /></li>
</ul>

on mouseover i want to append a div inside that <li> with a greater z-
index than the img so that div comes "in front" of the image(like a
bar with links for image editing).On mouseout i want it to disappear.
anyway...the problem is that those images are constantly changed
(loaded via load method) and i tried something like this:

$('img').live('mouseover',function(){
    $(this).append('<div>links links</div>');
});

$('img').live('mouseout',function(){
    $('div').remove()
});

so...the actual problem is that when the mouse leaves the image area
and comes on the div area..the div disappear and appear continuously
so i can't click the links inside.Remember that the div comes "over"
the image(you know what i mean...it's a classic effect by now).
so..how should i do it right? thanks

  

Reply via email to