aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.button.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-02-21 17:48:55 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-02-21 17:48:55 +0100
commit6528b48b4762b0ddf3697580444fdf9f34e7eca9 (patch)
tree46e0e17d0b8356d0e9d142e9a00bdf242d5bbf2c /ui/jquery.ui.button.js
parent98d72c7f6d0f1c535774d4db85556626e016603c (diff)
parentd32a9e81ecb8a201c1737c3226a99c33ced451af (diff)
downloadjquery-ui-6528b48b4762b0ddf3697580444fdf9f34e7eca9.tar.gz
jquery-ui-6528b48b4762b0ddf3697580444fdf9f34e7eca9.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r--ui/jquery.ui.button.js16
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;
});
})