aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2011-07-29 13:55:55 -0700
committerFelix Nagel <info@felixnagel.com>2011-07-29 13:55:55 -0700
commitab6c7443fabe711b76ec4376737ee70876cc2dd8 (patch)
treed91874f2557c8bec6d7cffd2c245ed93a883b985
parentdfec00ba40d58a714d97710d52582cb80076c118 (diff)
parentd35924eb54abb697d70306c999fa4ba980d74db9 (diff)
downloadjquery-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.js15
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)
});
});