diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-04-26 23:38:21 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-05-05 21:43:57 -0400 |
commit | 803eaf29f732a68793b806356096fe849b9f470b (patch) | |
tree | d1be32beb2405e1abf1db89a4d67c7ec4ec8c9ee /ui/selectmenu.js | |
parent | 6a03b0f2ba422ec8edbf642eab692cbd20af2f4d (diff) | |
download | jquery-ui-803eaf29f732a68793b806356096fe849b9f470b.tar.gz jquery-ui-803eaf29f732a68793b806356096fe849b9f470b.zip |
Core: Add $.fn.labels, $.fn.form, and $.ui.escapeSelector methods
$.fn.labels and $.fn.form mimic the native labels and form properties
$.ui.escapeSelector is for escaping attributes and urls for use as selectors
Closes gh-1546
Diffstat (limited to 'ui/selectmenu.js')
-rw-r--r-- | ui/selectmenu.js | 6 |
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 ); } } ); |