mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Ref #13554: Move redundant methods to event-alias.js. Close gh-1225.
(cherry picked from commits8ca9f931ec84a94acae1100d3c3516)
This commit is contained in:
committed by
Richard Gibson
parent
8f4bebea7d
commit
8594decfcc
@@ -10,6 +10,23 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
||||
};
|
||||
});
|
||||
|
||||
jQuery.fn.hover = function( fnOver, fnOut ) {
|
||||
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
||||
};
|
||||
jQuery.fn.extend({
|
||||
hover: function( fnOver, fnOut ) {
|
||||
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
||||
},
|
||||
|
||||
bind: function( types, data, fn ) {
|
||||
return this.on( types, null, data, fn );
|
||||
},
|
||||
unbind: function( types, fn ) {
|
||||
return this.off( types, null, fn );
|
||||
},
|
||||
|
||||
delegate: function( selector, types, data, fn ) {
|
||||
return this.on( types, selector, data, fn );
|
||||
},
|
||||
undelegate: function( selector, types, fn ) {
|
||||
// ( namespace ) or ( selector, types [, fn] )
|
||||
return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
|
||||
}
|
||||
});
|
||||
|
||||
15
src/event.js
15
src/event.js
@@ -971,21 +971,6 @@ jQuery.fn.extend({
|
||||
});
|
||||
},
|
||||
|
||||
bind: function( types, data, fn ) {
|
||||
return this.on( types, null, data, fn );
|
||||
},
|
||||
unbind: function( types, fn ) {
|
||||
return this.off( types, null, fn );
|
||||
},
|
||||
|
||||
delegate: function( selector, types, data, fn ) {
|
||||
return this.on( types, selector, data, fn );
|
||||
},
|
||||
undelegate: function( selector, types, fn ) {
|
||||
// ( namespace ) or ( selector, types [, fn] )
|
||||
return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
|
||||
},
|
||||
|
||||
trigger: function( type, data ) {
|
||||
return this.each(function() {
|
||||
jQuery.event.trigger( type, data, this );
|
||||
|
||||
Reference in New Issue
Block a user