mardi 23 février 2016

Bootstrap Multiselect - Single Checkbox with Options

Is it possible to build a Bootstrap Multiselect where the list functions like normal, BUT I have the ability to add a checkbox at the end?

I have a list I want to build where there are two versions of every option in the list. I would like the checkbox to serve as a toggle for the data.

HTML:

<select class="form-control" id="accompany">
     <option>None</option>
     <option>Metronome</option>
     <option>Piano</option>
     <option>Rock</option>
     <option>Pop</option>
     <option>Blues</option>
     <option>Latin</option>
     <option>Classical</option>
     <option><label><input type="checkbox" value="Melody">Melody</label></option>
</select>

JS:

<script type="text/javascript">
     $(document).ready(function() {
          $('#accompany').multiselect();
     });
</script>

I know this is not the proper syntax nor init values, but you can at least see what I'm trying to do from the HTML snippit




Aucun commentaire:

Enregistrer un commentaire