I have an autocomplete which takes results from google suggestions. On a page I have multiple input fields which I’d like to include that function so that all inputs will be taking results from google suggestion and using the jquery autocomplete widget.
Here is a Fiddle: http://jsfiddle.net/8q25P/
Note on the first input it parse’s google queries. On the second which has different ID its where I want to implement the feature aswell.
Thanks alot
Here are the changes..
http://jsfiddle.net/gaby/ag9gv/
First you need to apply the autocomplete to both elements and also bind the
retrieveto both.and
You also need to change your ajax call and the retrieve method a bit, to make the related element auto-discoverable.. (create a variable and pass it to the success method)