将hintText替换为预定义列表

发布于 2024-12-23 02:37:25 字数 422 浏览 2 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

染柒℉ 2024-12-30 02:37:25

您可以在这里使用完全不同的用户体验方法,并使用 Harvest 的 Chosen 插件,使用多选

Chosen Screenshot

它看起来很棒,效果很好,并且可以在不同的环境中重复使用。

You could use an entirely different UX approach here and go with Harvest's Chosen plugin, using Multiple Select:

Chosen screenshot

It looks wonderful, works well, and can be re-used in different contexts.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文