Passing jQuery Autocomplete search method value to search event
I am making a call to the search method and passing a value
$('myelem').autocomplete('search','test');
Then I have an event handler for the search event
search: function (event,ui){
//I need to access the value 'test' passed from the search method in the search event
}
So far I can not find out how to a开发者_如何学Goccess the value in the search event handler. The value is available in the source: function (request, response)
event handler in the request.term
property.
The documentation reads:
search: function(event, ui) { ... }
However, the ui parameter turns out to be an empty object.
精彩评论