tm4321 / jquery.geocomplete

A simple plugin for Google Maps Autocomplete.
http://projects.trentmentink.com/jquery_geocomplete/
MIT License
16 stars 8 forks source link

Autocomplete doesn't work after first AJAX html load #15

Open martypaz opened 4 years ago

martypaz commented 4 years ago

Hi Trent - I'v been scratching my head for hours now about how to do this.

I have a popup tool and one of the fields is the address autocomplete with an id of franchiseAddress. Autocomplete works after the first load but when I close the popup, load the next franchise's record the autocomplete no longer works.

Is it because your code or Google's is already bound to the previous input and it won't re-attache the geocmplete function to and already initialised form element? If so, is there any way between the Ajax loads I can destory all the Google or geocomplete events etc?

Thanks in advance - Martin