diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-07-20 14:49:14 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-20 14:49:14 -0400 |
commit | 123467af8efc8541e333979a59ca9db36fec9cda (patch) | |
tree | c51219ada651da7f32da40815c095bad8d498b39 /demos | |
parent | 5d1e29764024128e9cc71a19589cfe11e6241242 (diff) | |
download | jquery-ui-123467af8efc8541e333979a59ca9db36fec9cda.tar.gz jquery-ui-123467af8efc8541e333979a59ca9db36fec9cda.zip |
Autocomplete (combobox demo): Set intial value of text field based on value of select element. Partial fix for #5757 - Autocomplete combobox issues.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/autocomplete/combobox.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index c76cfa130..1b7b668a9 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -22,9 +22,12 @@ $.widget( "ui.combobox", { _create: function() { var self = this; - var select = this.element.hide(); + var select = this.element.hide(), + selected = select.children( ":selected" ), + value = selected.val() ? selected.text() : ""; var input = $( "<input>" ) .insertAfter( select ) + .val( value ) .autocomplete({ delay: 0, minLength: 0, |