📜  如何使用 jquery 分配 bootstrapswitch - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:20.405000             🧑  作者: Mango

代码示例2
$('#toggle-state-switch').bootstrapSwitch('state'); // Get the state
$('#toggle-state-switch').bootstrapSwitch('state', false); // Set the state as off
$('#toggle-state-switch').bootstrapSwitch('state', false, false); // Set the state as off and do not trigger switchChange event
$('#toggle-state-switch').bootstrapSwitch('toggleState'); // Toggle the state
$('#toggle-state-switch').bootstrapSwitch('toggleState'); // Toggle the state and do not trigger switchChange event