Ajax Autocomplete
Ajax Autocomplete
Hi there,
i am trying to get the jquery autocomplete to work, but i am new to javascript and jquery and i got a problem.
I want to realise autocomplete via ajax call on my wordpress site.
I think the json call is working. Firebug shows me that ajax returns a response in the form of:
["Name1", "Name2", Name3"]
But my search field does not display the list of suggestions. How can i put the ajax response into the autocomplete suggestions?
- jQuery("#s").autocomplete({
- source: function( request, response ) {
- jQuery.getJSON( MyAjax_object.ajaxurl + "?callback=?&action=myajax-submit", request, response);
- },
- });
Thanks a lot.