Andrew has a script that shows how to do it with custom events:
http://github.com/savetheclocktower/javascript-stuff/tree/master/custom-events/mouse_enter_leave.js
It's not as convenient as real mouseenter/mouseleave behaviour,
because these event will bubble. Child elements will fire mouse:enter/
mouse:leave events onto their parent. You'd have to filter out these
unwanted event before this will work.
I'd prefer something similar as the patch Ken posted implemented into
core. It doesn't have the overhead and is much more convenient since
it allows you to do this:
$(element).observe('mouseleave', handler);
jQuery and Mootools use a similar approach. It's much closer to the
spec, since it doesn't involve event bubbling like the real mouseenter/
mouseleave events.
On 10 jun, 21:10, Alex K <[EMAIL PROTECTED]> wrote:
> Hi Guys, I've suffered IE weird bug:
>
> this browser sends onmouseout events even if the mouse is actually
> within the scope of the element, this happens when the mouse is over
> the child element. There is a way to solve this, IE send the proper
> event with name 'mouseleave', so my code looks like:
>
> //one more weird IE bug
> var mouse_out_event_name =
> Prototype.Browser.IE?'mouseleave':'mouseout';
> Event.observe(list_item,mouse_out_event_name,this.onmouseout.bindAsEventListener(this));
>
> Just a thought that it can be handled by the lib to save time of other
> folks,
> Thanks,
> Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---