diff options
author | Felix Nagel <info@felixnagel.com> | 2012-12-15 02:40:14 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-12-15 02:40:14 +0100 |
commit | 76f335ea68982f90c45b3ec1d124434645edbd2e (patch) | |
tree | c57f53ac9cc7211ffec64a998b5090ecdd967fe6 /ui/jquery.ui.selectmenu.js | |
parent | 1b1dbd8e3aa1c43354a5874ceb302c18a7833a00 (diff) | |
download | jquery-ui-76f335ea68982f90c45b3ec1d124434645edbd2e.tar.gz jquery-ui-76f335ea68982f90c45b3ec1d124434645edbd2e.zip |
Selectmenu: CGL and lint fixes
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 1bfcb56ab..36917a58f 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -190,7 +190,8 @@ $.widget( "ui.selectmenu", { return; } - var _position = { + var currentItem, + _position = { of: this.button }; @@ -198,8 +199,8 @@ $.widget( "ui.selectmenu", { this._toggleAttr(); // do not change position if non default position options are set (needed for custom positioned popup menus) - if ( this.items && !this.options.dropdown && this.options.position.my == "left top" && this.options.position.at == "left bottom" ) { - var currentItem = this._getSelectedItem(); + if ( this.items && !this.options.dropdown && this.options.position.my === "left top" && this.options.position.at === "left bottom" ) { + currentItem = this._getSelectedItem(); // center current item if ( this.menu.outerHeight() < this.menu.prop( "scrollHeight" ) ) { this.menuWrap.css( "left" , -10000 ); |