title: Cannot set property '_renderItem' of undefined
body: <p>This is my code... 
  Can anyone help me?</p>
  
  <blockquote>
    <p>$(document).ready(function() {</p>
  </blockquote>
  
  <pre><code>//$('#search input[name="filter_name"]').attr("x-webkit-speech", "x-webkit-speech")
  $('#search input[name="input-search-menu"]').autocomplete({
      source: function(request, response) {
          $.ajax({
              url: 'index.php?route=module/search_suggestion/ajax',
              dataType: 'json',
              data: {
                  keyword: request.term
              },
              success: function(json) {
                  response($.map(json, function(item) {
                      return {
                          fields: item.fields,
                          value: item.href
                      }
                  }));
              }
          });
      },
      minLength: 1,
      select: function(event, ui) {
          if (ui.item.value == "") {
              return false;
          } else {
              location.href = ui.item.value;
              return fse;
          }
      },
      open: function() {
          $(this).removeClass("ui-corner-all").addClass("ui-corner-top");
      },
      close: function() {
          $(this).removeClass("ui-corner-top").addClass("ui-corner-all");
      },
      focus: function(event, ui) {
          $('#search input[name="filter_name"]').val(ui.item.label);
          return false;
      }
  }).data("ui-autocomplete")._renderItem = function(ul, item) {
  
      var elements = [];
      $.each(item.fields, function(field_name, field) {
        if (field != undefined &amp;&amp; field[field_name] != undefined &amp;&amp; field[field_name]) {
  
          var field_html = '';            
          if (field_name == 'price') {
            if (field.special) {
              field_html = '&lt;span class="price-old"&gt;' + field.price + '&lt;/span&gt;&lt;span class="price-new"&gt;' + field.special + '&lt;/span&gt;';
            } else {
              field_html = field.price;
            } 
          } else {
            field_html = field[field_name];
          }
  
          if (field.label != undefined &amp;&amp; field.label.show != undefined &amp;&amp; field.label.show) {
            field_html = '&lt;span class="label"&gt;' + field.label.label + '&lt;/span&gt;' + field_html;
          }
          if (field.location != undefined &amp;&amp; field.location == 'inline') {
            field_html = '&lt;span class="' + field_name + '"&gt;' + field_html + '&lt;/span&gt;';
          } else {
            field_html = '&lt;div class="' + field_name + '"&gt;' + field_html + '&lt;/div&gt;';
          }
  
          elements.push({sort: field.sort, html: field_html});
        }
      });
  
      // sort
      elements.sort(function(a, b){return a.sort-b.sort});
  
      // implode
      var elements_html = '';
      $.each(elements, function(index, element) {
        if (element != undefined) {
          elements_html = elements_html + element.html;
        }
      });     
  
      return $("&lt;li&gt;&lt;/li&gt;")
          .data("item.autocomplete", item)
          .append('&lt;a class="search-suggestion"&gt;' + elements_html + '&lt;/a&gt;')
          .appendTo(ul);
  };
  </code></pre>
  
  <p>});</p>
  
  <p>`I'm getting cannot set property '_render_item' on my js file. This stopped my js file working. Can anyone help me with my code?</p>
  
  <p>Thanks in advance</p>