github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 921
    • 212
  • Source
  • Commits
  • Network (212)
  • Graphs
  • Tree: 123467a

click here to add a description

click here to add a homepage

  • Switch Branches (8)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
    • widget-super
  • Switch Tags (21)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.4
    • 1.8.3
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Autocomplete (combobox demo): Set intial value of text field based on value of select element. Partial fix for #5757 - Autocomplete combobox issues.
scottgonzalez (author)
Tue Jul 20 11:49:14 -0700 2010
commit  123467af8efc8541e333
tree    c51219ada651da7f32da
parent  5d1e29764024128e9cc7
M demos/autocomplete/combobox.html 5 •••••
Txt demos/autocomplete/combobox.html
  • View file @ 123467a
... ...
@@ -22,9 +22,12 @@
22 22
     $.widget( "ui.combobox", {
23 23
       _create: function() {
24 24
         var self = this;
25  
-        var select = this.element.hide();
  25
+        var select = this.element.hide(),
  26
+          selected = select.children( ":selected" ),
  27
+          value = selected.val() ? selected.text() : "";
26 28
         var input = $( "<input>" )
27 29
           .insertAfter( select )
  30
+          .val( value )
28 31
           .autocomplete({
29 32
             delay: 0,
30 33
             minLength: 0,

0 notes on commit 123467a

Please log in to comment.
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文