mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
jquery event: closes #3112. It wasn't possible to bind 'data' to special events.
This commit is contained in:
parent
6eb2bfe6ae
commit
b36fe4686c
10
src/event.js
10
src/event.js
@ -66,7 +66,7 @@ jQuery.event = {
|
|||||||
// Check for a special event handler
|
// Check for a special event handler
|
||||||
// Only use addEventListener/attachEvent if the special
|
// Only use addEventListener/attachEvent if the special
|
||||||
// events handler returns false
|
// 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
|
// Bind the global event handler to the element
|
||||||
if (elem.addEventListener)
|
if (elem.addEventListener)
|
||||||
elem.addEventListener(type, handle, false);
|
elem.addEventListener(type, handle, false);
|
||||||
@ -370,9 +370,9 @@ jQuery.event = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mouseenter: {
|
mouseenter: {
|
||||||
setup: function() {
|
setup: function( data ) {
|
||||||
if ( jQuery.browser.msie ) return false;
|
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;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -392,9 +392,9 @@ jQuery.event = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mouseleave: {
|
mouseleave: {
|
||||||
setup: function() {
|
setup: function( data ) {
|
||||||
if ( jQuery.browser.msie ) return false;
|
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;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user