Tiago Matos
Tiago Matos

Reputation: 1716

Selectize.js render selectize-control before select

How I would render a selectize instance with selectize-control wrap before the select element?

Originally it rends like this

<select>...</select>
<div class="selectize-control multi">...</div>

How I would do this

<div class="selectize-control multi">...</div>
<select>...</select>

The plugin url is http://selectize.github.io/selectize.js/

Upvotes: 0

Views: 296

Answers (1)

Ahmad Radi
Ahmad Radi

Reputation: 164

Inside selectize.js, search for this line

$input.attr('tabindex', -1).hide().after(self.$wrapper);

replace it with

$input.attr('tabindex', -1).hide().before(self.$wrapper);

But I think you should search for a better solution.

Upvotes: 0

Related Questions