How to get twitter bootstrap toggle switch values using jquery

后端 未结 4 1338
梦毁少年i
梦毁少年i 2021-01-31 17:51

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 :

<         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-31 18:31

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

    Refer this link for more functions

提交回复
热议问题