开发者

extend jqueryui autocomplete

开发者 https://www.devze.com 2023-01-18 09:02 出处:网络
How can I take use of the autocomplete functions to match the following requirements? If suggestion matches more than 10 items, it should i开发者_开发技巧nstead of showing the suggestions, show the

How can I take use of the autocomplete functions to match the following requirements?

  • If suggestion matches more than 10 items, it should i开发者_开发技巧nstead of showing the suggestions, show the number of entries next to the input

  • If suggestion matches less than 10 items, it should suggest the autocompletion

I'm new to jquery and jqueryui, but is it right that I can control the "open" event to achieve my requirements? Can anyone help me out here, please? :D


Here you have an example: http://jsfiddle.net/marcosfromero/wD9RH/

You should use the callback option for the source parameter.

Read Overview in Autocomplete documentation page to understand how to use it:

0

精彩评论

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