How to get twitter bootstrap toggle switch values using jquery

后端 未结 4 1339
梦毁少年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:32

    $('#switcher').bootstrapSwitch('state');
    

    Not work for me, but in my version:

    $("#switcher").bootstrapSwitch("status");
    

    can work well.

提交回复
热议问题