Fix and test callbacks for autocompleters

feature/core
Sven Slootweg 11 years ago
parent 7403edbfd9
commit 03b9786f3f

@ -147,7 +147,7 @@ AutoCompleterInstance.prototype._selectCurrent = function() {
if(typeof this.callback !== "undefined")
{
this.callback(item).apply(this);
this.callback.call(this, item);
}
else
{

@ -250,7 +250,9 @@ $(function(){
$("#input_search_query").on("input", function(){
if(!$(this).data("attached-autocomplete"))
{
$("#input_search_query").autoComplete(autocompleter_search, new SearchCompletionSource($("#input_search_query")));
$("#input_search_query").autoComplete(autocompleter_search, new SearchCompletionSource($("#input_search_query")), function(data){
console.log(data);
});
}
});
});

Loading…
Cancel
Save