Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get twitter bootstrap toggle switch values using jquery

I am using http://bootstrapswitch.site/ for toggle switch buttons. How can I get the toggle switch like 'on' or 'off' using jQuery?

My Code is :

<div class="make-switch  switch-small"><input type="radio" class="nsfw"></div>

Please tell me how to solve this issue.

like image 909
lalith458 Avatar asked Sep 11 '25 04:09

lalith458


1 Answers

$('#switcher').bootstrapSwitch('state'); // true || false
$('#switcher').bootstrapSwitch('toggleState');

Refer this link for more functions

like image 107
janhartmann Avatar answered Sep 12 '25 20:09

janhartmann