如何触发选择输入以使选项最初显示 [英] how to trigger selectize input to make options shown initially

查看:27
本文介绍了如何触发选择输入以使选项最初显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 selectize,我想在不单击 selectize 输入的情况下显示一些选项.所以我使用 $('.selectize-input').click() 但它不起作用.如何在不点击输入的情况下显示几个选项?

I'm using selectize, and I want to show a few options without clicking selectize input. So I use $('.selectize-input').click() but it doesn't work. How to show a few options without clicking input?

推荐答案

假设你绑定了 selectize 插件,比如 $('.selectize-input').selectize(options),你应该能够像这样使用 API 的 open 方法:>

Assuming that you bind selectize plugin something like $('.selectize-input').selectize(options), you should be able to use API's open method like this:

$('.selectize-input')[0].open();

这篇关于如何触发选择输入以使选项最初显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆