From 89f10420cf24ecb93d018da236399ba9b5588add Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 11 Mar 2010 20:21:38 +0000 Subject: Button: No need to check the button type before removing the hidden class. --- ui/jquery.ui.button.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index ce4c86a94..cf15d2ee6 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -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 ); }, -- cgit v1.2.3