简体   繁体   English

查找jQuery自动完成插件

[英]Finding jQuery autocomplete plugin

I went through many autocomplete plugins, but have not found the right one. 我经历了许多自动完成插件,但没有找到合适的插件。

My JSON response looks like: 我的JSON响应如下所示:

[
{ mode: 'link', url : 'http://aaa.com', name: 'AAA', img: 'http://aa.com/a.gif' },
{ mode: 'link', url : 'http://bbb.com', name: 'BBB', img: 'http://aa.com/b.gif' },
{ mode: 'link', url : 'http://ccc.com', name: 'CCC', img: 'http://aa.com/c.gif' },
]

What I need: 我需要的:

  • Not jQueryUI :) 不是jQueryUI :)
  • Can selecte only one option (don't need Facebook -style autocomplete) 只能选择一个选项(不需要Facebook样式的自动完成功能)
  • I need event onSelect fired from drop-down-list to change page's location to json's url property. 我需要从drop-down-list触发事件onSelect来将页面的位置更改为json's url属性。
  • I need to format drop-down-list , based on own json data. 我需要根据自己的json数据设置drop-down-list格式。 For example, I need to draw images and so on... ( img property from json ) 例如,我需要绘制图像等等...( json img属性)

Anybody knows a jQuery plugin, that fits these requirements? 有人知道符合这些要求的jQuery插件吗?

PS jQuery TokenInput http://loopj.com/jquery-tokeninput/ is very good, but I don't need that many options. PS jQuery TokenInput http://loopj.com/jquery-tokeninput/非常好,但是我不需要那么多选项。

I guess EasyAutocomplete is a plugin for you. 我想EasyAutocomplete是适合您的插件。 It matches all of yours requirements, plus it can a lot more. 它符合您所有的要求,而且可以满足更多要求。 It's well documented in the guide section and it has prepared couple of examples, that shows how it works. 指南部分对此进行了很好的记录,并准备了一些示例,以说明其工作原理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM