From b796cc57bd1eb0557849ece88c5794b70656f5cd Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 29 Jul 2011 14:57:06 -0400 Subject: jQuery 1.6 support. --- ui/jquery.ui.button.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ui/jquery.ui.button.js') diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 1e1d04097..2fac87cea 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -56,7 +56,7 @@ $.widget( "ui.button", { .bind( "reset.button", formResetHandler ); if ( typeof this.options.disabled !== "boolean" ) { - this.options.disabled = this.element.attr( "disabled" ); + this.options.disabled = this.element.propAttr( "disabled" ); } this._determineButtonType(); @@ -153,7 +153,7 @@ $.widget( "ui.button", { return false; } $( this ).addClass( "ui-state-active" ); - self.buttonElement.attr( "aria-pressed", true ); + self.buttonElement.attr( "aria-pressed", "true" ); var radio = self.element[ 0 ]; radioGroup( radio ) @@ -162,7 +162,7 @@ $.widget( "ui.button", { return $( this ).button( "widget" )[ 0 ]; }) .removeClass( "ui-state-active" ) - .attr( "aria-pressed", false ); + .attr( "aria-pressed", "false" ); }); } else { this.buttonElement @@ -272,9 +272,9 @@ $.widget( "ui.button", { $.Widget.prototype._setOption.apply( this, arguments ); if ( key === "disabled" ) { if ( value ) { - this.element.attr( "disabled", true ); + this.element.propAttr( "disabled", true ); } else { - this.element.removeAttr( "disabled" ); + this.element.propAttr( "disabled", false ); } return; } @@ -291,22 +291,22 @@ $.widget( "ui.button", { if ( $( this ).is( ":checked" ) ) { $( this ).button( "widget" ) .addClass( "ui-state-active" ) - .attr( "aria-pressed", true ); + .attr( "aria-pressed", "true" ); } else { $( this ).button( "widget" ) .removeClass( "ui-state-active" ) - .attr( "aria-pressed", false ); + .attr( "aria-pressed", "false" ); } }); } else if ( this.type === "checkbox" ) { if ( this.element.is( ":checked" ) ) { this.buttonElement .addClass( "ui-state-active" ) - .attr( "aria-pressed", true ); + .attr( "aria-pressed", "true" ); } else { this.buttonElement .removeClass( "ui-state-active" ) - .attr( "aria-pressed", false ); + .attr( "aria-pressed", "false" ); } } }, -- cgit v1.2.3