From: Ariel Flesler Date: Wed, 9 Jul 2008 21:38:28 +0000 (+0000) Subject: jquery event: closes #3112. It wasn't possible to bind 'data' to special events. X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=b36fe4686c76dc13ba64fd62e38387c7ed73e0c9;hp=6eb2bfe6aefaeff522a9d3a8ac9511e15932bfcf;p=jquery.git jquery event: closes #3112. It wasn't possible to bind 'data' to special events. --- diff --git a/src/event.js b/src/event.js index 9947780..8529d13 100644 --- a/src/event.js +++ b/src/event.js @@ -66,7 +66,7 @@ jQuery.event = { // Check for a special event handler // Only use addEventListener/attachEvent if the special // events handler returns false - if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) { + if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem,data) === false ) { // Bind the global event handler to the element if (elem.addEventListener) elem.addEventListener(type, handle, false); @@ -370,9 +370,9 @@ jQuery.event = { }, mouseenter: { - setup: function() { + setup: function( data ) { if ( jQuery.browser.msie ) return false; - jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler); + jQuery(this).bind("mouseover", data, jQuery.event.special.mouseenter.handler); return true; }, @@ -392,9 +392,9 @@ jQuery.event = { }, mouseleave: { - setup: function() { + setup: function( data ) { if ( jQuery.browser.msie ) return false; - jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler); + jQuery(this).bind("mouseout", data, jQuery.event.special.mouseleave.handler); return true; },