Skip to content

Commit

Permalink
Fix hover style for selectmenu bug #203
Browse files Browse the repository at this point in the history
  • Loading branch information
s-simoncelli committed Dec 14, 2011
1 parent 8a0b734 commit a683cc4
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions ui/jquery.ui.selectmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,25 @@ $.widget("ui.selectmenu", {
}
return true;
})
.bind('mouseover.selectmenu focus.selectmenu', function() {
if (!o.disabled) {
$(this).addClass(self.widgetBaseClass + '-focus ui-state-hover');
}
.bind('focus.selectmenu', function() {
if (!o.disabled) {
$(this).addClass(self.widgetBaseClass + '-focus');
}
})
.bind('mouseout.selectmenu blur.selectmenu', function() {
if (!o.disabled) {
$(this).removeClass(self.widgetBaseClass + '-focus ui-state-hover');
}
.bind('blur.selectmenu', function() {
if (!o.disabled) {
$(this).removeClass(self.widgetBaseClass + '-focus');
}
})
.bind('mouseover.selectmenu', function() {
if (!o.disabled) {
$(this).addClass('ui-state-hover');
}
})
.bind('mouseout.selectmenu', function() {
if (!o.disabled) {
$(this).removeClass('ui-state-hover');
}
});

// document click closes menu
Expand Down

0 comments on commit a683cc4

Please sign in to comment.