aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.selectmenu.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-04-29 21:54:36 +0200
committerFelix Nagel <info@felixnagel.com>2013-04-29 21:54:36 +0200
commit60eed79390def4cbc6ee6e1edf89d749176e8b29 (patch)
treef05ecb1beb9fd4b803c38e12ac376ec6851fb27d /ui/jquery.ui.selectmenu.js
parent0264f07ad5e6029496776f7ef3f60a368e495579 (diff)
downloadjquery-ui-60eed79390def4cbc6ee6e1edf89d749176e8b29.tar.gz
jquery-ui-60eed79390def4cbc6ee6e1edf89d749176e8b29.zip
Selectmenu: improve id generation
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r--ui/jquery.ui.selectmenu.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index b2e0d629c..9ed150c2e 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -40,7 +40,11 @@ $.widget( "ui.selectmenu", {
_create: function() {
var selectmenuId = this.element.uniqueId().attr( "id" );
- this.ids = { id: selectmenuId, button: selectmenuId + "-button", menu: selectmenuId + "-menu" };
+ this.ids = {
+ element: selectmenuId,
+ button: selectmenuId + "-button",
+ menu: selectmenuId + "-menu"
+ };
this._drawButton();
this._drawMenu();
@@ -56,7 +60,7 @@ $.widget( "ui.selectmenu", {
var tabindex = this.element.attr( "tabindex" );
// fix existing label
- this.label = $( "label[for='" + this.ids.id + "']" ).attr( "for", this.ids.button );
+ this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
this._on( this.label, {
"click": function( event ) {
this.button.focus();
@@ -461,7 +465,7 @@ $.widget( "ui.selectmenu", {
this.button.remove();
this.element.show();
this.element.removeUniqueId();
- this.label.attr( "for", this.ids.id );
+ this.label.attr( "for", this.ids.element );
}
});