title: Append separator line after jQuery UI Autocomplete items except after the last item
body: <p>I have a jQuery UI Autocomplete bound to an input element and a custom display of the items in the Autocomplete box. Each item has multiple lines and I want to separate the items clearly from each other, for example using a <code>&lt;hr /&gt;</code> element. The following works but it also renders a <code>&lt;hr /&gt;</code> element after the last item:</p>
  
  <pre><code>$(function () {
      $("#Customer").autocomplete({
          source: "/SomePath/SearchCustomers?term=ABC",
          select: function (event, ui) {
              $("#CustomerId").val(ui.item.customerId);
              return false;
          }
      })
      .data("autocomplete")._renderItem = function (ul, item) {
          var renderedItem = $("&lt;li&gt;&lt;/li&gt;")
              .data("item.autocomplete", item)
              .append("&lt;a&gt;" + item.customerId + ", " + item.name + "&lt;br /&gt;"
                  + item.addressLine1 + "&lt;br /&gt;"
                  + item.countryCode + ", " + item.city + "&lt;/a&gt;");
  
          // if (IsNotTheLastItem(item))  &lt;-- Is something like this possible?
              renderedItem = renderedItem.append("&lt;hr /&gt;");
  
          renderedItem = renderedItem.appendTo(ul);
  
          return renderedItem;
      };
  });
  </code></pre>
  
  <p>(The code is derived from the example here: <a href="http://jqueryui.com/demos/autocomplete/#custom-data" rel="noreferrer">http://jqueryui.com/demos/autocomplete/#custom-data</a> (click on "View Source").)</p>
  
  <p>Is it possible to determine if the item I am going to render is the last item (as indicated in the comment line above)? Or is there some alternative to add a separator between items, but not after the last item?</p>