diff options
author | Felix Nagel <info@felixnagel.com> | 2012-05-24 18:30:39 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-05-24 18:30:39 +0200 |
commit | ec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae (patch) | |
tree | d1c46a37211705bb3b1c58b164bb40af29e9727e /ui/jquery.ui.selectmenu.js | |
parent | c3f6bd912e697aa6e480564e7507e7ffb749decc (diff) | |
download | jquery-ui-ec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae.tar.gz jquery-ui-ec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae.zip |
Selectmenu: small fixes for lint tests
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 57d004690..ba3e208b2 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -166,7 +166,8 @@ $.widget( "ui.selectmenu", { refresh: function() { this.menu.empty(); - var options = this.element.find( 'option' ); + var item, + options = this.element.find( 'option' ); if ( options.length ) { this._readOptions( options ); this._renderMenu( this.menu, this.items ); @@ -178,7 +179,7 @@ $.widget( "ui.selectmenu", { this.menuItems.find( 'a' ).attr( 'role', 'option' ); // select current item - var item = this._getSelectedItem(); + item = this._getSelectedItem(); this.menu.menu( "focus", null, item ); this._setSelected( item.data( "item.selectmenu" ) ); @@ -244,7 +245,7 @@ $.widget( "ui.selectmenu", { currentOptgroup = ""; $.each( items, function( index, item ) { - if ( item.optgroup != currentOptgroup ) { + if ( item.optgroup !== currentOptgroup ) { $( '<li />', { 'class': 'ui-selectmenu-optgroup' + ( item.element.parent( "optgroup" ).attr( "disabled" ) ? ' ui-state-disabled' : '' ), html: item.optgroup @@ -416,7 +417,7 @@ $.widget( "ui.selectmenu", { index: index, value: option.attr( 'value' ), label: option.text() || ' ', - optgroup: optgroup.attr( "label" ) || false, + optgroup: optgroup.attr( "label" ) || "", disabled: optgroup.attr( "disabled" ) || option.attr( "disabled" ) }); }); |