diff options
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 1c3cf2c64..25f1668a5 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -66,7 +66,7 @@ $.widget( "ui.button", { this._determineButtonType(); this.hasTitle = !!this.buttonElement.attr( "title" ); - var self = this, + var that = this, options = this.options, toggleButton = this.type === "checkbox" || this.type === "radio", hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ), @@ -104,10 +104,10 @@ $.widget( "ui.button", { this.element .bind( "focus.button", function() { // no need to check disabled, focus won't be triggered anyway - self.buttonElement.addClass( focusClass ); + that.buttonElement.addClass( focusClass ); }) .bind( "blur.button", function() { - self.buttonElement.removeClass( focusClass ); + that.buttonElement.removeClass( focusClass ); }); if ( toggleButton ) { @@ -115,7 +115,7 @@ $.widget( "ui.button", { if ( clickDragged ) { return; } - self.refresh(); + that.refresh(); }); // if mouse moves between mousedown and mouseup (drag) set clickDragged flag // prevents issue where button state changes but checkbox/radio checked state @@ -145,7 +145,7 @@ $.widget( "ui.button", { return false; } $( this ).toggleClass( "ui-state-active" ); - self.buttonElement.attr( "aria-pressed", self.element[0].checked ); + that.buttonElement.attr( "aria-pressed", that.element[0].checked ); }); } else if ( this.type === "radio" ) { this.buttonElement.bind( "click.button", function() { @@ -153,9 +153,9 @@ $.widget( "ui.button", { return false; } $( this ).addClass( "ui-state-active" ); - self.buttonElement.attr( "aria-pressed", "true" ); + that.buttonElement.attr( "aria-pressed", "true" ); - var radio = self.element[ 0 ]; + var radio = that.element[ 0 ]; radioGroup( radio ) .not( radio ) .map(function() { @@ -172,7 +172,7 @@ $.widget( "ui.button", { } $( this ).addClass( "ui-state-active" ); lastActive = this; - self.document.one( "mouseup", function() { + that.document.one( "mouseup", function() { lastActive = null; }); }) |