将hintText替换为预定义列表
我正在使用 jQuery Tokeninput 开发一个项目。该插件的描述如下:
Tokeninput 是一个 jQuery 插件,它允许您的用户从预定义列表中选择多个项目,并使用自动完成功能 键入以查找每个项目。
请在此处查看工作版本: http://jsfiddle.net/WGmrr/
有没有办法可以展示一旦用户单击输入框但在用户开始键入之前,是否会显示整个预定义列表,从而有效地替换读取键入搜索词
的hintText
?
I'm working on a project using jQuery Tokeninput. The plugin is described as such:
Tokeninput is a jQuery plugin which allows your users to select multiple items from a predefined list, using autocompletion as they
type to find each item.
See a working version here: http://jsfiddle.net/WGmrr/
Is there a way that I can show the entire predefined list once the user clicks the inputbox but before the user starts typing, effectively replacing the hintText
that reads Type in a search term
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在这里使用完全不同的用户体验方法,并使用 Harvest 的 Chosen 插件,使用
多选
:它看起来很棒,效果很好,并且可以在不同的环境中重复使用。
You could use an entirely different UX approach here and go with Harvest's Chosen plugin, using
Multiple Select
:It looks wonderful, works well, and can be re-used in different contexts.