title: jQuery UI Autocomplete disable Select & Close events
body: <p>I'm using jQuery UI's Autocomplete slightly differently than it was probably created to do.</p>
  
  <p>Basically I want to keep all the same functionality, the only difference is that when the suggestion box appears, I don't the suggestion box to hide when a user makes a selection and I also don't want that selection to populate the input box that .autocomplete is attached to.</p>
  
  <p>So, I've been reading through the jQuery UI documentation, and it appears there is a way to disable the Select: and Close: events, but I find the way they have explained it to be very confusing and hence, this is why I'm here asking for help.</p>
  
  <p><strong>My jQuery</strong></p>
  
  <pre><code>$( "#comment" ).autocomplete({
      source: "comments.php",
      minLength: 4,
  
      // Attempt to remove click/select functionality - may be a better way to do this        
      select: function( event, ui ) {
          return false;
      },
      // Attempt to add custom Class to the open Suggestion box - may be a better way
      open : function (event, ui) {
          $(this).addClass("suggestion-box");
      },
      // Attempt to cancel the Close event, so when someone makes a selection, the box does not close
      close : function (event, ui) {
          return false;   
      }
  });
  </code></pre>
  
  <p><strong>Official jQuery UI documentation</strong></p>
  
  <blockquote>
    <p>Triggered when an item is selected from the menu; ui.item refers to the selected item.
    The default action of select is to replace the text field's value with the value of the 
    selected item. Canceling this event prevents the value from being updated, but does not
    prevent the menu from closing.</p>
  </blockquote>
  
  <p>Code examples</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><strong>Confusion</strong></p>
  
  <p>What confuses me is that they seem to be suggesting to remove the .autocomplete and replace with .bind("autocompleteselect") - which will disable the autocomplete altogether?</p>
  
  <p>Thank you very much for any help you can give.</p>