]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: No need to check the button type before removing the hidden class.
authorScott González <scott.gonzalez@gmail.com>
Thu, 11 Mar 2010 20:21:38 +0000 (20:21 +0000)
committerScott González <scott.gonzalez@gmail.com>
Thu, 11 Mar 2010 20:21:38 +0000 (20:21 +0000)
ui/jquery.ui.button.js

index ce4c86a944e7eb0d52a6166b2d906c0038482465..cf15d2ee60c6562efb37ad7d91a41f3e7bd39aab 100644 (file)
@@ -202,7 +202,7 @@ $.widget( "ui.button", {
 
        destroy: function() {
                this.buttonElement
-                       .removeClass( baseClasses + " " + otherClasses )
+                       .removeClass( baseClasses + " ui-helper-hidden-accessible " + otherClasses )
                        .removeAttr( "role" )
                        .removeAttr( "aria-pressed" )
                        .html( this.buttonElement.find(".ui-button-text").html() );
@@ -211,10 +211,6 @@ $.widget( "ui.button", {
                        this.buttonElement.removeAttr( "title" );
                }
 
-               if ( this.type === "checkbox" || this.type === "radio" ) {
-                       this.element.removeClass('ui-helper-hidden-accessible');
-               }
-
                $.Widget.prototype.destroy.call( this );
        },