title: trigger(liszt:updated) - Cannot use 'in' operator to search for 'length' in <!DOCTYPE html>
body: <p>This error shows in console. I want an Autocomplete filter search that if i select a location, sublocations will show up </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot use 'in' operator to search for 'length' in <code>&lt;!DOCTYPE html&gt;</code></p>
  </blockquote>
  
  <p>This is my code</p>
  
  <pre><code>    $(document).ready(function() {
              $('#filter_sublocation &gt; option[value!=""]').remove();
              $( "#filter_sublocation" ).trigger( "liszt:updated" );
              $('#filter_location').change(function() {
                  var location = this.value;
                  $.ajax({
                      url: 'index.php? 
     option=com_dlahe&amp;c=home&amp;task=sublocation&amp;location=' + location,
                      success: function(data) {
                          $('#filter_sublocation &gt; option[value!=""]').remove();
                          $.each(data, function(k, v) {
                              $('#filter_sublocation').append('&lt;option value="' + k + '"&gt;' + v + '&lt;/option&gt;');
                          });
                          $( "#filter_sublocation" ).trigger( "liszt:updated" );
                      },
                      cache: false
                  });
              });
          });
  </code></pre>