We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f33062 commit 82d0056Copy full SHA for 82d0056
ui/jquery.ui.menubar.js
@@ -137,10 +137,13 @@ $.widget( "ui.menubar", {
137
input.removeClass( "ui-button-text-only" ).addClass( "ui-button-text-icon-secondary" );
138
}
139
} else {
140
- // TODO use _on
141
- input.bind( "click mouseenter", function( event ) {
142
- if ( ( that.open && event.type === "mouseenter" ) || event.type === "click" ) {
143
- that._close();
+ that._on( input, {
+ click: function( event ) {
+ if ( that.open ){ that._close(); }
+ },
144
+
145
+ mouseenter: function( event ) {
146
147
148
});
149
0 commit comments