How to get twitter bootstrap toggle switch values using jquery

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

    As far as I can tell the method has been updated (but not well documented).

    $('#switcher').bootstrapSwitch('state', true)
    $('#switcher').bootstrapSwitch('state', false)
    

提交回复
热议问题