how to assign bootstrapswitch using jquery

Solutions on MaxInterview for how to assign bootstrapswitch using jquery by the best coders in the world

showing results for - "how to assign bootstrapswitch using jquery"
Myles
15 Jun 2018
1$('#disable-switch').bootstrapSwitch('disabled');
2$('#disable-switch').bootstrapSwitch('toggleDisabled');
3$('#disable-switch').bootstrapSwitch('disabled', true);  // true || false
4
5$('#readonly-switch').bootstrapSwitch('readonly');
6$('#readonly-switch').bootstrapSwitch('toggleReadonly');
7$('#readonly-switch').bootstrapSwitch('readonly', true);  // true || false
Alejandro
04 Jun 2020
1$('#toggle-state-switch').bootstrapSwitch('state'); // Get the state
2$('#toggle-state-switch').bootstrapSwitch('state', false); // Set the state as off
3$('#toggle-state-switch').bootstrapSwitch('state', false, false); // Set the state as off and do not trigger switchChange event
4$('#toggle-state-switch').bootstrapSwitch('toggleState'); // Toggle the state
5$('#toggle-state-switch').bootstrapSwitch('toggleState'); // Toggle the state and do not trigger switchChange event
6
Marta
10 Jul 2016
1<form class="form-horizontal">
2  <div class="form-group">
3    <label class="control-label" for="inputEmail">Email</label>
4    <input type="text" id="inputEmail" placeholder="Email">
5  </div>
6  <div class="form-group">
7    <label class="control-label" for="notification1">Notification 1</label>
8    <input id="notification1" type="checkbox">
9  </div>
10  <div class="form-group">
11    <label class="control-label" for="notification2">Notification 2</label>
12    <input id="notification2" type="checkbox">
13  </div>
14  <div class="form-actions">
15    <button type="reset" class="btn btn-inverse">Reset</button>
16  </div>
17</form>