I am trying to use Google Autocomplete on multiple class elements but it doesn't seem to be working. It works when I reference one id, as seen here but not with my fiddle. This is my code so far:
$(document).ready(function () {
addressLookup();
});
function addressLookup() {
var address = document.getElementsByClassName('form-control booking address');
var options = {
componentRestrictions: {
country: 'uk'
}
};
new google.maps.places.Autocomplete(address, options);
}