]> source.dussan.org Git - jquery.git/commitdiff
moved bind, unbind, delegate & undelegate to event-alias.js; refs #13554
authorMichał Gołębiowski <m.goleb@gmail.com>
Mon, 4 Mar 2013 03:03:57 +0000 (04:03 +0100)
committerDave Methvin <dave.methvin@gmail.com>
Tue, 26 Mar 2013 02:06:50 +0000 (22:06 -0400)
src/event-alias.js
src/event.js

index 0a87c59655c47a13195df580dd9225148c6bdf78..b1a15e840e4e4372f5f6946a5ce4c903db1ad15b 100644 (file)
@@ -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 );
+       }
+});
index d784e1c66f3d8d79e0afd7b9fe5e3f6b9bdf50ac..4804e5a7d8dd1de4940de7968a78f89b9d18e451 100644 (file)
@@ -800,21 +800,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 );