On Sep 15, 2010, at 5:46 AM, ColinFine wrote:



On Sep 14, 6:21 am, ncubica <ncub...@gmail.com> wrote:
Hi... I have a list <ul><li></li></ul> with 3 observers click,
mouseover, mouseleave, the problem is when I tried to observer the
mouseleave event throw the <ul> object doing something like

        $(this.id).observe("mouseleave", function(event){
           var li = event.findElement("li");
            if (li) {
               //do some
            }
        }.bind(this));

is weird sometimes work and in Internet explorer doesn't work but
insted If I do something like

        this.tabs.each(function(item, index){
            var idObject = ""// some id format;
            $(idObject).observe("mouseleave", function(event){
                //do some
            }.bind(this));
        }.bind(this));

works perflectly does anyone knows why is the reason for this
behavior??

This is puzzling, as AFAIK "mouseleave" is implemented _only_ on IE.
[1]

Are you sure you don't mean "mouseout", which is implemented on all
browsers, but bubbles, which means that if you set it on the ul it
will fire whenever you leave the ul _or one of its li's_?

[1] http://www.quirksmode.org/dom/events/mouseover.html


Prototype 1.6.1 implements mouseleave cross-browser. It uses the native event on IE, and simulates it with a fast DOM lookup on all other browsers.

Walter


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to