Not long ago I've written about how to use Google's Map AutoComplete API
. Now I've been going through my code and refactoring it. The new method is more flexible and easier to use.
My changes rely on jQuery
being part of your project.
This is what the initialisation code looks like now. Note that it does not search for any specific input element ID
, instead it searches for all input elements that have the CSS
and sets them up as an auto-completable
In my HTML
, I do something like this...
Any input element with the same CSS
class will be initialised now.
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...