From 78a6354180053ffb8e54be6bfb69260c6da2d2e8 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Tue, 8 Jan 2013 21:36:34 -0500 Subject: Effects: fix backwards compatibility in animateClass for jQuery Core <1.8 --- ui/jquery.ui.effect.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ui') diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js index e45b76de0..860eb5706 100644 --- a/ui/jquery.ui.effect.js +++ b/ui/jquery.ui.effect.js @@ -754,6 +754,15 @@ function styleDifference( oldStyle, newStyle ) { return diff; } +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + $.effects.animateClass = function( value, duration, easing, callback ) { var o = $.speed( duration, easing, callback ); -- cgit v1.2.3