diff options
author | Felix Nagel <info@felixnagel.com> | 2011-07-29 13:55:55 -0700 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2011-07-29 13:55:55 -0700 |
commit | ab6c7443fabe711b76ec4376737ee70876cc2dd8 (patch) | |
tree | d91874f2557c8bec6d7cffd2c245ed93a883b985 | |
parent | dfec00ba40d58a714d97710d52582cb80076c118 (diff) | |
parent | d35924eb54abb697d70306c999fa4ba980d74db9 (diff) | |
download | jquery-ui-ab6c7443fabe711b76ec4376737ee70876cc2dd8.tar.gz jquery-ui-ab6c7443fabe711b76ec4376737ee70876cc2dd8.zip |
Merge pull request #145 from Netson/patch-1
Minor optimization
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 781ef0f3d..7c9818597 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -248,15 +248,16 @@ $.widget("ui.selectmenu", { this.element .find('option') .each(function() { + var opt = $(this); selectOptionData.push({ - value: $(this).attr('value'), + value: opt.attr('value'), text: self._formatText($(this).text()), - selected: $(this).attr('selected'), - disabled: $(this).attr('disabled'), - classes: $(this).attr('class'), - typeahead: $(this).attr('typeahead'), - parentOptGroup: $(this).parent('optgroup'), - bgImage: o.bgImage.call($(this)) + selected: opt.attr('selected'), + disabled: opt.attr('disabled'), + classes: opt.attr('class'), + typeahead: opt.attr('typeahead'), + parentOptGroup: opt.parent('optgroup'), + bgImage: o.bgImage.call(opt) }); }); |