]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects Core: make removeClass work correctly with changes jQuery 1.9.0. Fixed #9015... 895/head
authorDavid Petersen <public@petersendidit.com>
Sat, 26 Jan 2013 17:59:08 +0000 (11:59 -0600)
committerDavid Petersen <public@petersendidit.com>
Tue, 29 Jan 2013 13:47:54 +0000 (07:47 -0600)
tests/unit/effects/effects_core.js
ui/jquery.ui.effect.js

index 26390b7d34a7f9a47267bbb76313ea07e60fbef7..c9b1e1b4a8b5d721a1b9270eecc94d715045c6b5 100644 (file)
@@ -38,6 +38,17 @@ asyncTest( "Parse of null for options", function() {
        });
 });
 
+test( "removeClass", function() {
+       expect( 3 );
+
+       var element = $( "<div>" );
+       equal( "", element[ 0 ].className );
+       element.addClass( "destroyed" );
+       equal( "destroyed", element[ 0 ].className );
+       element.removeClass();
+       equal( "", element[ 0 ].className );
+});
+
 
 /* TODO: Disabled - Can't figure out why this is failing in IE 6/7
 test( "createWrapper and removeWrapper retain focused elements (#7595)", function() {
index c6623a0a15039a3bfad94b15d530825e1ec4e652..97f006ee06a81fbe155931df5aff6c1fc82e9f5d 100644 (file)
@@ -849,10 +849,10 @@ $.fn.extend({
 
        _removeClass: $.fn.removeClass,
        removeClass: function( classNames, speed, easing, callback ) {
-               return speed ?
+               return arguments.length > 1 ?
                        $.effects.animateClass.call( this,
                                { remove: classNames }, speed, easing, callback ) :
-                       this._removeClass( classNames );
+                       this._removeClass.apply( this, arguments );
        },
 
        _toggleClass: $.fn.toggleClass,