skube, try *mouseleave*  instead, that one take bubbling into account.

On 3/3/08, skube <[EMAIL PROTECTED]> wrote:
>
>
> I am a little confused about event bubbling. Say for example I have
> the following bit of HTML:
>
> <code>
> <div id="main">
>         <div id="one">
>                 one
>         </div>
>         <div id="two">
>                 two
>         </div>
> </div>
> </code>
>
> when I try:
> <code>
> $("#main").mouseout(function() {
>         alert('test');
> });
> </code>
>
> The alert gets fired even when mousing in/out of divs one/two, but
> while still staying within the main div.
>
> How do I fire the alert only if I mouseout of everything (including
> main), not just out of one and into two?
>



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com

Reply via email to