Mattia Larentis 12 лет назад
Родитель
Сommit
bb70c70710
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      README.md

+ 1 - 0
README.md

@@ -209,6 +209,7 @@ $('.mySwitch').bootstrapSwitch('toggleRadioStateAllowUncheck'); // don't allow u
 $('.mySwitch').bootstrapSwitch('toggleRadioStateAllowUncheck', false); // don't allow uncheck radio switch
 $('.mySwitch').bootstrapSwitch('toggleRadioStateAllowUncheck', true); // allow uncheck radio switch
 $('#mySwitch').bootstrapSwitch('setState', true);
+$('#mySwitch').bootstrapSwitch('setState', true || false, true); // sets the state without getting the switch-change event
 $('#mySwitch').bootstrapSwitch('setOnLabel', onValue); // sets the text of the "on" label
 $('#mySwitch').bootstrapSwitch('setOffLabel', offValue); // sets the text of the "off" label
 $('#mySwitch').bootstrapSwitch('setOnClass', onClass); // sets the left color class