Konza
Konza

Reputation: 2173

Add checkbox to options in selectize js

Is it possible to add a checkbox to the option renderers so that users can select and deselect the item by clicking on the checkbox.

I was able to add the checkbox by adding

<input type = "checkbox">

to the option renderers. But I have no clue about how to handle the click function and add the selected value to the header. I have tried the remove_button plugin. But thats not what I am looking for.

Thanks in advance

Upvotes: 13

Views: 1821

Answers (1)

AEngineer
AEngineer

Reputation: 1

You need to add a toggle event and a publications input:

$('.Publications input[type=checkbox]')

then toggle that when clicked.

Upvotes: 0

Related Questions