diff options
author | Felix Nagel <info@felixnagel.com> | 2012-01-11 20:53:02 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-01-11 20:53:02 +0100 |
commit | 8c17f74a1e64e134108f790d2527df18284ac9cc (patch) | |
tree | abb74a55e7b180bfa8c37bad04cd8e4fd1008df8 /ui | |
parent | db4acf61d14210360fdebda602297bc2bdc959ed (diff) | |
download | jquery-ui-8c17f74a1e64e134108f790d2527df18284ac9cc.tar.gz jquery-ui-8c17f74a1e64e134108f790d2527df18284ac9cc.zip |
Selectmenu: create menu items with first opening to increase performance
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 511760972..b116caa1e 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -62,7 +62,6 @@ $.widget( "ui.selectmenu", { this._bind( this.button, this._buttonEvents ); this._drawMenu(); - this.refresh(); }, _drawButton: function() { @@ -191,6 +190,12 @@ $.widget( "ui.selectmenu", { }, open: function( event ) { + // init menu when initial opened + if ( !this.wasOpen ) { + this.refresh(); + this.wasOpen = true; + } + var currentItem = this._getSelectedItem(); if ( !this.options.disabled ) { |