开发者

Passing jQuery Autocomplete search method value to search event

开发者 https://www.devze.com 2023-01-12 09:11 出处:网络
I am making a call to the search method and passing a value $(\'myelem\').autocomplete(\'search\',\'test\');

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消