Skip to content

Commit 78a6354

Browse files
committed
Effects: fix backwards compatibility in animateClass for jQuery Core <1.8
1 parent e63cb47 commit 78a6354

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ui/jquery.ui.effect.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,15 @@ function styleDifference( oldStyle, newStyle ) {
754754
return diff;
755755
}
756756

757+
// support: jQuery <1.8
758+
if ( !$.fn.addBack ) {
759+
$.fn.addBack = function( selector ) {
760+
return this.add( selector == null ?
761+
this.prevObject : this.prevObject.filter( selector )
762+
);
763+
};
764+
}
765+
757766
$.effects.animateClass = function( value, duration, easing, callback ) {
758767
var o = $.speed( duration, easing, callback );
759768

0 commit comments

Comments
 (0)