Hunter1010
Hunter1010

Reputation: 85

how to trigger selectize input to make options shown initially

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?

Upvotes: 2

Views: 1454

Answers (1)

dfsq
dfsq

Reputation: 193261

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();

Upvotes: 1

Related Questions