scratch – Diff between revs 58 and 125

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 58 Rev 125
1 define( [ 1 define([
2 "../core", 2 "../core",
3   -  
4 "../event", 3 "../event"
5 "./trigger" -  
6 ], function( jQuery ) { 4 ], function( jQuery ) {
7   -  
8 "use strict"; -  
9   5  
10 jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + 6 jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
11 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 7 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
12 "change select submit keydown keypress keyup contextmenu" ).split( " " ), -  
13 function( i, name ) { 8 "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
14   9  
15 // Handle event binding 10 // Handle event binding
16 jQuery.fn[ name ] = function( data, fn ) { 11 jQuery.fn[ name ] = function( data, fn ) {
17 return arguments.length > 0 ? 12 return arguments.length > 0 ?
18 this.on( name, null, data, fn ) : 13 this.on( name, null, data, fn ) :
19 this.trigger( name ); 14 this.trigger( name );
20 }; 15 };
21 } ); 16 });
22   17  
23 jQuery.fn.extend( { 18 jQuery.fn.extend({
24 hover: function( fnOver, fnOut ) { 19 hover: function( fnOver, fnOut ) {
-   20 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
-   21 },
-   22  
-   23 bind: function( types, data, fn ) {
-   24 return this.on( types, null, data, fn );
-   25 },
-   26 unbind: function( types, fn ) {
-   27 return this.off( types, null, fn );
-   28 },
-   29  
-   30 delegate: function( selector, types, data, fn ) {
-   31 return this.on( types, selector, data, fn );
-   32 },
-   33 undelegate: function( selector, types, fn ) {
-   34 // ( namespace ) or ( selector, types [, fn] )
25 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 35 return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
26 } 36 }
27 } ); 37 });
28   38  
29 } ); 39 });
30   40