[jQuery] Re: Event Bubbling - Not!

2008-03-04 Thread skube

That seems to work - sort of...

$("#main").bind("mouseleave", function(event) {
alert(event.target.id);
});

But I'm still having problems...when I use event.target.id the results
are inconsistent surprisingly in Firefox and not IE.

Also, it is worth noting I needed to use the latest jQuery release
1.2.3.


On Mar 3, 5:25 pm, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> 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:
>
> > 
> > 
> > 
> > one
> > 
> > 
> > two
> > 
> > 
> > 
>
> > when I try:
> > 
> > $("#main").mouseout(function() {
> > alert('test');
> > });
> > 
>
> > 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 
> Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjaminsterling.com


[jQuery] Re: Event Bubbling - Not!

2008-03-03 Thread Benjamin Sterling
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:
>
> 
> 
> 
> one
> 
> 
> two
> 
> 
> 
>
> when I try:
> 
> $("#main").mouseout(function() {
> alert('test');
> });
> 
>
> 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