title: Getting jquery autocomplete suggestion list on select or enter
body: <p>I'm looking for some help customizing the jQuery autocomplete widget. I'm using autocomplete on some big arrays and showing a few of the results in the suggestions. When the user hits enter (or selects a value, enter would be nice too though), I want to get the list of suggestions into an array so I can display them elsewhere.</p>
  
  <p>This is pretty close to what I want, I'm going to keep playing with it and hopefully figure this out on my own:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;input id="autocomplete"/&gt;
  &lt;div class="test"&gt;Output goes here:&lt;br/&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>$('input').autocomplete({
      search: function(event, ui) {
          $('.test ul').empty();
      },
      source: ["something", "something-else"]
  }).data('autocomplete')._renderItem = function(ul, item) {
  
      return $('&lt;li/&gt;')
     .data('item.autocomplete', item)
     .append(item.value)
     .appendTo($('.test ul'));
  };
  </code></pre>
  
  <p><a href="http://jsfiddle.net/uMqyn/1/" rel="nofollow">http://jsfiddle.net/uMqyn/1/</a></p>
  
  <p>Thanks!</p>