@@ -26,29 +26,18 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
26
26
function ( _i , name ) {
27
27
28
28
// Handle event binding
29
- migratePatchAndWarnFunc ( jQuery . fn , name , function ( data , fn ) {
30
- return arguments . length > 0 ?
31
- this . on ( name , null , data , fn ) :
32
- this . trigger ( name ) ;
33
- } ,
34
- "shorthand-deprecated-v3" ,
35
- "jQuery.fn." + name + "() event shorthand is deprecated" ) ;
29
+ migratePatchAndWarnFunc ( jQuery . fn , name , jQuery . fn [ name ] , "shorthand-deprecated-v3" ,
30
+ "jQuery.fn." + name + "() event shorthand is deprecated" ) ;
36
31
} ) ;
37
32
38
- migratePatchAndWarnFunc ( jQuery . fn , "bind" , function ( types , data , fn ) {
39
- return this . on ( types , null , data , fn ) ;
40
- } , "pre-on-methods" , "jQuery.fn.bind() is deprecated" ) ;
41
- migratePatchAndWarnFunc ( jQuery . fn , "unbind" , function ( types , fn ) {
42
- return this . off ( types , null , fn ) ;
43
- } , "pre-on-methods" , "jQuery.fn.unbind() is deprecated" ) ;
44
- migratePatchAndWarnFunc ( jQuery . fn , "delegate" , function ( selector , types , data , fn ) {
45
- return this . on ( types , selector , data , fn ) ;
46
- } , "pre-on-methods" , "jQuery.fn.delegate() is deprecated" ) ;
47
- migratePatchAndWarnFunc ( jQuery . fn , "undelegate" , function ( selector , types , fn ) {
48
- return arguments . length === 1 ?
49
- this . off ( selector , "**" ) :
50
- this . off ( types , selector || "**" , fn ) ;
51
- } , "pre-on-methods" , "jQuery.fn.undelegate() is deprecated" ) ;
52
- migratePatchAndWarnFunc ( jQuery . fn , "hover" , function ( fnOver , fnOut ) {
53
- return this . on ( "mouseenter" , fnOver ) . on ( "mouseleave" , fnOut || fnOver ) ;
54
- } , "hover" , "jQuery.fn.hover() is deprecated" ) ;
33
+ migratePatchAndWarnFunc ( jQuery . fn , "bind" , jQuery . fn . bind ,
34
+ "pre-on-methods" , "jQuery.fn.bind() is deprecated" ) ;
35
+ migratePatchAndWarnFunc ( jQuery . fn , "unbind" , jQuery . fn . unbind ,
36
+ "pre-on-methods" , "jQuery.fn.unbind() is deprecated" ) ;
37
+ migratePatchAndWarnFunc ( jQuery . fn , "delegate" , jQuery . fn . delegate ,
38
+ "pre-on-methods" , "jQuery.fn.delegate() is deprecated" ) ;
39
+ migratePatchAndWarnFunc ( jQuery . fn , "undelegate" , jQuery . fn . undelegate ,
40
+ "pre-on-methods" , "jQuery.fn.undelegate() is deprecated" ) ;
41
+
42
+ migratePatchAndWarnFunc ( jQuery . fn , "hover" , jQuery . fn . hover ,
43
+ "hover" , "jQuery.fn.hover() is deprecated" ) ;
0 commit comments