mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: changed _bind to _on
This commit is contained in:
parent
5092d0296a
commit
8f5f4b38cd
6
ui/jquery.ui.selectmenu.js
vendored
6
ui/jquery.ui.selectmenu.js
vendored
@ -42,7 +42,7 @@ $.widget( "ui.selectmenu", {
|
||||
this.ids = { id: selectmenuId, button: selectmenuId + '-button', menu: selectmenuId + '-menu' };
|
||||
|
||||
// catch click event of the label
|
||||
this._bind({
|
||||
this._on({
|
||||
'click': function( event ) {
|
||||
this.button.focus();
|
||||
event.preventDefault();
|
||||
@ -50,14 +50,14 @@ $.widget( "ui.selectmenu", {
|
||||
});
|
||||
|
||||
this._drawButton();
|
||||
this._bind( this.button, this._buttonEvents );
|
||||
this._on( this.button, this._buttonEvents );
|
||||
this._hoverable( this.button );
|
||||
this._focusable( this.button );
|
||||
|
||||
this._drawMenu();
|
||||
|
||||
// document click closes menu
|
||||
this._bind( document, {
|
||||
this._on( document, {
|
||||
click: function( event ) {
|
||||
if ( this.isOpen && !$( event.target ).closest( "li.ui-state-disabled, li.ui-selectmenu-optgroup, #" + this.ids.button ).length ) {
|
||||
this.close( event );
|
||||
|
Loading…
Reference in New Issue
Block a user