]> source.dussan.org Git - jquery.git/commitdiff
Fix inverted 'orig' and 'fix' event in mouseenter/mouseleave special events.
authorlrbabe <lrbabe@lrbabe-laptop>
Mon, 30 Nov 2009 20:04:55 +0000 (04:04 +0800)
committerJohn Resig <jeresig@gmail.com>
Sun, 6 Dec 2009 01:13:57 +0000 (09:13 +0800)
src/event.js

index c857bd21c08f04031e8cc98a506255285724471d..bf7798bb7dbb1977a0c2b3f4e928c5de722d9eca 100644 (file)
@@ -538,15 +538,15 @@ delegate = function( event ) {
 
 // Create mouseenter and mouseleave events
 jQuery.each({
-       mouseover: "mouseenter",
-       mouseout: "mouseleave"
+       mouseenter: "mouseover",
+       mouseleave: "mouseout"
 }, function( orig, fix ) {
-       jQuery.event.special[ fix ] = {
+       jQuery.event.special[ orig ] = {
                setup: function(data){
-                       jQuery.event.add( this, orig, data && data.selector ? delegate : withinElement, fix );
+                       jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
                },
                teardown: function(data){
-                       jQuery.event.remove( this, orig, data && data.selector ? delegate : withinElement );
+                       jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
                }
        };
 });