aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.button.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-11-12 23:28:24 +0100
committerFelix Nagel <info@felixnagel.com>2012-11-12 23:28:24 +0100
commitdaec559c981a410089f3c0d310f6a5986142c9a5 (patch)
tree7fdb3fff84f70ef135af5f2ba0064f519db6d70a /ui/jquery.ui.button.js
parent967e2b74b2e6f1a8e908f060369c3ef51f0cbd7e (diff)
parent902df84fce790178da78c5830498911a487d50cf (diff)
downloadjquery-ui-daec559c981a410089f3c0d310f6a5986142c9a5.tar.gz
jquery-ui-daec559c981a410089f3c0d310f6a5986142c9a5.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r--ui/jquery.ui.button.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 6d7b94a38..db04b63b8 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -70,13 +70,15 @@ $.widget( "ui.button", {
var that = this,
options = this.options,
toggleButton = this.type === "checkbox" || this.type === "radio",
- hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ),
+ activeClass = !toggleButton ? "ui-state-active" : "",
focusClass = "ui-state-focus";
if ( options.label === null ) {
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
}
+ this._hoverable( this.buttonElement );
+
this.buttonElement
.addClass( baseClasses )
.attr( "role", "button" )
@@ -84,7 +86,6 @@ $.widget( "ui.button", {
if ( options.disabled ) {
return;
}
- $( this ).addClass( "ui-state-hover" );
if ( this === lastActive ) {
$( this ).addClass( "ui-state-active" );
}
@@ -93,7 +94,7 @@ $.widget( "ui.button", {
if ( options.disabled ) {
return;
}
- $( this ).removeClass( hoverClass );
+ $( this ).removeClass( activeClass );
})
.bind( "click" + this.eventNamespace, function( event ) {
if ( options.disabled ) {