I try to integrate the jQuery Autocomplete plugin [1], but doestn't work for me. Here my code:
$('#input').autocomplete(function(term) {
var searchUrl = urlBase + 'tagging/autocomplete/?term=' + term;
$.getJSON(searchUrl, function(jsonData) {
test = jsonData;
console.log(test);
});
});
The output from console.log looks like:
[ "EBE", "EBE1", "EBE2"]
For the output i'm using the php function json_encode()
echo json_encode ($words);
Can someone tell me, what is wrong on my code? With the dummy data from the plugin page is working....but not when i try to retrive the data over the URI.