Skip to content
Permalink
Browse files

Fix inverted 'orig' and 'fix' event in mouseenter/mouseleave special …

…events.
  • Loading branch information
lrbabe authored and jeresig committed Nov 30, 2009
1 parent 3afc653 commit 2d27e053a0e6ab4917a4f79918b58257600c5b82
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/event.js
@@ -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 );
}
};
});

0 comments on commit 2d27e05

Please sign in to comment.
You can’t perform that action at this time.