title: jquery autocomplete renderItem
body: <p>I have the following code. It generates no js errors. Can't get the autocomplete to display any results:</p>
  
  <pre><code>$(function() {
      $.ajax({
      url: "data.xml",
      dataType: "xml",
      cache: false,
      success: function (xmlResponse) {
          var data_results = $("Entry", xmlResponse).map(function () {
              return {
                  var1: $.trim($("Partno", this).text()),
                  var2: $.trim($("Description", this).text()),
                  var3: $.trim($("SapCode", this).text()),
                  var4: $("Title", this).text(),
                  var5: $.trim($("File", this).text()),
                  var6: $.trim($("ItemID", this).text())
              };
          }).get();
  
          $("#searchresults").autocomplete({
              source: data_results,
              minLength: 3,
              select: function (event, ui) {
                  ...
              }
          }).data( "autocomplete" )._renderItem = function( ul, item ) {
                  return $( "&lt;li&gt;&lt;/li&gt;" ).data("item.autocomplete", item)
                      .append( "&lt;a&gt;" + item.var1 + "&lt;br&gt;" + item.var2 + "&lt;/a&gt;")
                      .appendTo( ul );
          };
  
      }
  });
  </code></pre>
  
  <p>Any ideas what I might be missing? Thanks in advance.</p>