开发者

jQuery autocomplete show results 'containing' query not begining with query

开发者 https://www.devze.com 2022-12-21 20:31 出处:网络
jQuery autocomplete plugin shows results t开发者_如何学Chat begin with the query you type into a search box. How would you amend the plugin to allow you to show results that contain the query you are

jQuery autocomplete plugin shows results t开发者_如何学Chat begin with the query you type into a search box. How would you amend the plugin to allow you to show results that contain the query you are typing? for example, i am searching for people, i want to be able to type either a firstname or a surname, i type 'and' i want it to show Adam Anderson, James Anderson, Andy Smith


The version of the "autocomplete" plugin I use already has a "matchContains" option. If that's set to true, then it behaves exactly as you describe.

http://www.pengoworks.com/workshop/jquery/autocomplete.htm

0

精彩评论

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