title: Autocomplete google maps JS error
body: <p>I have been trying to get the autocomplete to work with class name although since I have done that I cannot add the event listener anymore ? Anyone has got a solution to that ?</p>
  
  <p>This is my code </p>
  
  <pre><code>function InitiliazeGoogleSearch() {
   var input = document.getElementsByClassName('js-autocomplete');
   for (i = 0; i &lt; input.length; i++) {
      autocomplete = new google.maps.places.Autocomplete(input[i]);
   }
  
   google.maps.event.addListener(autocomplete, 'place_changed', function () {
      if(!$('.js-main-filter_wrapper').css('display','block')) {
          $('.js-main-filter_wrapper').slideToggle();
      }
   });
  }
  </code></pre>