Does this not work out?
myEl.addEvent('mouseover', function(e) {
if($(e.target) != myEl) return; //is a child element
// do the good stuff
});
On Fri, Nov 5, 2010 at 11:00 AM, 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!