1. $('#codepostal').autocomplete({
  2.     source: postalcodes,
  3.     minLength: 2,
  4.     focus: function(event, ui) {
  5.         $(this).val(ui.item.value);
  6.  
  7.         return false;
  8.     }
  9. })
  10.     .data("autocomplete")._renderItem = function(ul, item) {
  11.     return $("<li></li>")
  12.         .data("item.autocomplete", item)
  13.         .append("<a>" + item.value + " - " + item.label + "</a>")
  14.         .appendTo(ul);
  15. };
  16.