I\'ve been at this for a while and I\'m making very slow progress mostly because my jquery skills need improvement, I am trying though :)
I have this code:
The real issue for me is getting the JSON data from the response into the autocomplete results
Just looking at your code, it looks like the autocomplete should be populating correctly. Are you sure the data is coming back? If you keep having problems, try using a local data source and see if the problems persist.
if any of these are clicked it directs the page to data.url.
You can accomplish this by defining an event handler for the select
event:
$("input").autocomplete({
/* Snip */
select: function(event, ui) {
window.location = ui.item.url;
}
});
ui.item
refers to the item that was selected in the dropdown.
Here's an example of this working (with a local data source):
https://jsfiddle.net/gbdarren/k2q5rfdh/5/