jquery: nested tags and hover() not working in IE

Posted by mafka on Stack Overflow See other posts from Stack Overflow or by mafka
Published on 2009-10-07T20:56:44Z Indexed on 2010/05/21 10:50 UTC
Read the original article Hit count: 150

Filed under:
|
|
|

hello folks!

i have a construction like this:

<div id="container">

<span>
   <span></span>
</span>

<span>
   <span></span>
</span>

</div>

i need to catch the mouseout event of the container, so i made jquery do this:

$("#container").hover('',function(){ 
alert("Out"); 
});

In Firefox / Opera, it only fires the mouseout-function when leaving the div (how I want it).

In IE it fires the mouseout-function at every -Tag inside of the div the mouse hits. (maybe important is, that the span tags have also mouseover and out events)

Anyone has an idea how to solve this? (The nested structure cant be changed because a complex layout)

thx4 any ideas!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about internet-explorer