分类结果 – jQuery 自动完成插件
我正在寻找一个自动完成插件,可以轻松对搜索结果进行分类。如果不清楚,请查看 Apple.com 的搜索栏(右上角)。
我知道 script.aculo.us 的自动完成小部件提供了类似的功能,允许您将文本包装在 [span class="informal"] 中。每个 class="informal" 元素都不包含在键盘导航中。
由于我对在这个项目中包含两个不同的框架不太感兴趣,所以如果有人能告诉我如何修改 jQuery 的众多自动完成插件之一来模仿此功能,我会很高兴。
谢谢,期待看到您的答案!
I'm looking for an autocomplete plugin that makes it easy to categorize search results. If that's unclear, take a look at Apple.com's search bar (top right).
I know that script.aculo.us' autocomplete widget provides similar functionality, by allowing you to wrap text in a [span class="informal"]. Every class="informal" element is not included in keyboard navigation.
Since I'm not too thrilled about including two different frameworks in this project, I'd love it if someone could tell me how I'd go forward in modifying one of the many autocomplete-plugins for jQuery to mimic this functionality.
Thanks, looking forward to seeing your answers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您尝试 jQuery 自动完成。这样,您就可以以各种方式格式化结果。例如,函数的输出应类似于“url|linkname|third var”,以便您可以自己格式化结果。
I suggest you try jQuery autocomplete. With that, you are able to format the result in various ways. For example, the output of your function should look like "url|linkname|third var" so you are able to format the result yourself.