Facebook 风格的 JQuery 自动完成插件 [英] Facebook style JQuery autocomplete plugin
本文介绍了Facebook 风格的 JQuery 自动完成插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用了一个插件来做自动完成,就像 facebook 那样,你可以选择多个项目 - 类似于标记 stackoverflow 问题的工作方式.
Im after a plugin to do autocomplete like facebook does in that you can select multiple items - similar to how tagging a stackoverflow question works.
以下是我遇到的几个:
- http://wharsojo.wordpress.com/2008/02/18/jquery-facebook-autocomplete
- http://www.emposha.com/javascript/fcbkcomplete.html
- https://github.com/loopj/jquery-tokeninput
你试过这些吗?它们是否易于实施和定制?
Have you tried any of these? Were they easy to implement and customize?
推荐答案
https://github.com/loopj/jquery-tokeninput
我刚刚试了一下这个,使用 asp.net 页面输出 JSON(来自搜索参数)真的很容易实现然后你只需要几行 Javascript 就可以创建它(和设置)
I just had a go at this one and it was really easy to implement using an asp.net page to output the JSON (from the search params) Then theres just a few lines of Javascript you need to create it (and the settings)
$(document).ready(function() {
$("#Users").tokenInput("../Services/Job/UnassignedUsers.aspx?p=<%= projectID %>&j=<%= jobID %>", {
hintText: "Begin typing the user name of the person you wish to assign.",
noResultsText: "No results",
searchingText: "Searching..."
});
});
这篇关于Facebook 风格的 JQuery 自动完成插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文