Ok, you both gave me some good hints I guess, so thank you very much :)
On 5 Nov, 21:50, Rolf -nl <[email protected]> wrote: > What I've done to prevent such a thing is that when I instantiate the > class/singleton is creating the array/collection of the elements. Then > on the mouseenter event I first do a findTarget method that verifies > if the e.target is in the collection of elements I stored in the > beginning. If it's not that I getParent or use a selector/Slick to get > the correct one. > Sean's check returns if it's a child, which could be the effect you > want as well: do nothing if you move quickly to the child.. it > basically depends on what the application/site is supposed to do > really. > > I'm not 100% if my method is "correct" but it has worked for me when I > was working on a file manager where "files" where represented as divs > with childs 'n stuff ;) > > On Nov 5, 7:00 pm, stratboy <[email protected]> wrote: > > > Hi! > > > I was wandering: is there a way to make an element unable respond to > > events? > > > I always got the same problem: I add an event (say, mouseover) to an > > element, and also his children receive it. So for example, if I add an > > event to an element for tweening it, and mouseover some of the > > children, they'll tween to. We can stop the bubbling but not the > > capture phase. Even if I use delegation, well, not always the element > > I :relay() on, is empty... > > > So it would be good to have a way to make the children nodes unable to > > receive events. How do you generally solve this issue? > > > Thank you!
