Choices-js/Choices

Loading choices without <select> html elements

jinyeng opened this issue · 2 comments

Is it possible to initialize choices without html elements ? i.e. purely from JavaScript without having to create html markups ?

Yes, see the choices parameter or setChoices(). See the examples here.

@mtriff In the provided example though, it is initialized with an element: new Choices('#choices-single-no-search', {

and there is an html element created choices-single-no-search. My question was, if there is a way to render the choices without creating an html select element.