This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Repository navigation
iterate over options #1882
Unanswered
andreagosto
asked this question in
Q&A
Replies: 3 comments
var $select = $('select').selectize({...});
// <option> elements
var $options = $('option', $select);
// selectize options (an object)
var options = $select[0].selectize.options; |
0 replies
|
Just in case anyone else finds this question while attempting to iterate over the options object. Assuming brianreavis' code above, you can iterate over the "options" variable using: Object.keys(options). |
0 replies
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, i can't understand how i can iterate over all options element. I'm sorry, it must be a very basic function, but maybe is not too much intuitive! can someone help me?
All reactions