]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects: fix backwards compatibility in animateClass for jQuery Core <1.8
authorMike Sherov <mike.sherov@gmail.com>
Wed, 9 Jan 2013 02:36:34 +0000 (21:36 -0500)
committerMike Sherov <mike.sherov@gmail.com>
Wed, 9 Jan 2013 02:36:34 +0000 (21:36 -0500)
ui/jquery.ui.effect.js

index e45b76de0881cbe2d35411e7ce942e72e696cdad..860eb57061fd8502f0a838463e6ccac943902889 100644 (file)
@@ -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 );