vendredi 15 septembre 2017

Call function on click on Bootstrap toggle (checkbox)

I want to call a function updateText() when I click on the checkbox text_mode. I've tried using onClick="updateText()" but it didn't work. I have read some comments on similar questions, but all answers are using jQuery, can I do it without using any libraries, because all the js code for this project is done without any libraries?

This is the checkbox:

<label class="checkbox-inline">
   <input type="checkbox" checked data-toggle="toggle" data-size="mini" data-onstyle="default" id="text_mode" onclick="updateText()"> Braille
</label>

Thanks for the help in advance.




Aucun commentaire:

Enregistrer un commentaire