My block of jquery code is working on the existing field for address, but if user adds a new field for extra address, jquery code is no longer working even the selector I used is for class.
this is my block of code.
$(document).ready(function () {
const searchInput = document.querySelector('.autocomplete');
loadGooglePlaces(searchInput, {
types: ['geocode'],
});
});
I need to make sure that this block of code will be applied to another address field that the user added.