title: Hooking event handlers to jQuery Autocomplete Combobox
body: <p>I would like some advice on how to set event handlers for the jQuery Autocomplete Combox: <a href="http://jqueryui.com/demos/autocomplete/#combobox" rel="nofollow noreferrer">http://jqueryui.com/demos/autocomplete/#combobox</a>.</p>
  
  <p>Code examples from the jQuery doc are as per below:</p>
  
  <pre><code>// Supply a callback function to handle the select event as an init option.
  $( ".selector" ).autocomplete({
     select: function(event, ui) { ... }
  });
  // Bind to the select event by type: autocompleteselect.
  $( ".selector" ).bind( "autocompleteselect", function(event, ui) {
    ...
  });
  </code></pre>
  
  <p>I have tried this - as per below - but it doesn't work. I understand from this closed bug report (dev.jqueryui.com/ticket/5891) that I am "instantiating a combobox and then trying to set options using autocomplete", but I don't understand how to fix it.</p>
  
  <pre><code>// Have: &lt;select id="comboInput" name="comboInput"&gt; ....
  $(document).ready(function() {
     $("#comboInput").combobox();
     $("#comboInput").autocomplete({
        select: function(event, ui) {
           alert("Value selected.");
        }
     });
  });
  </code></pre>
  
  <p>Can anyone advise me on how to make this work? Thanks for any assistance!</p>