aboutsummaryrefslogtreecommitdiffstats
path: root/ui/selectmenu.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/selectmenu.js')
-rw-r--r--ui/selectmenu.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/selectmenu.js b/ui/selectmenu.js
index c52f6e452..dad7a1b40 100644
--- a/ui/selectmenu.js
+++ b/ui/selectmenu.js
@@ -90,8 +90,8 @@ return $.widget( "ui.selectmenu", {
);
// Associate existing label with the new button
- this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
- this._on( this.label, {
+ this.labels = this.element.labels();
+ this._on( this.labels, {
click: function( event ) {
this.button.focus();
event.preventDefault();
@@ -671,7 +671,7 @@ return $.widget( "ui.selectmenu", {
this.button.remove();
this.element.show();
this.element.removeUniqueId();
- this.label.attr( "for", this.ids.element );
+ this.labels.attr( "for", this.ids.element );
}
} );