Skip to content

Commit 8b009f2

Browse files
committed
All: Drop remaining jQuery <1.8 workarounds
Ref jquerygh-2249
1 parent ac8b1e4 commit 8b009f2

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

ui/data.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,10 @@
2828
"use strict";
2929

3030
return $.extend( $.expr.pseudos, {
31-
data: $.expr.createPseudo ?
32-
$.expr.createPseudo( function( dataName ) {
33-
return function( elem ) {
34-
return !!$.data( elem, dataName );
35-
};
36-
} ) :
37-
38-
// Support: jQuery <1.8
39-
function( elem, i, match ) {
40-
return !!$.data( elem, match[ 3 ] );
41-
}
31+
data: $.expr.createPseudo( function( dataName ) {
32+
return function( elem ) {
33+
return !!$.data( elem, dataName );
34+
};
35+
} )
4236
} );
4337
} );

ui/effect.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,6 @@ function styleDifference( oldStyle, newStyle ) {
125125
return diff;
126126
}
127127

128-
// Support: jQuery <1.8
129-
if ( !$.fn.addBack ) {
130-
$.fn.addBack = function( selector ) {
131-
return this.add( selector == null ?
132-
this.prevObject : this.prevObject.filter( selector )
133-
);
134-
};
135-
}
136-
137128
$.effects.animateClass = function( value, duration, easing, callback ) {
138129
var o = $.speed( duration, easing, callback );
139130

ui/widgets/datepicker.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,7 @@ $.extend( Datepicker.prototype, {
971971
$.datepicker._tidyDialog( inst );
972972
};
973973

974-
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
975-
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
974+
if ( $.effects && ( $.effects.effect[ showAnim ] ) ) {
976975
inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
977976
} else {
978977
inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :

0 commit comments

Comments
 (0)