I am not able to switch state of bootstrap switch. Could not understand why the error is being thrown. I use safari
<div class="form-group input-group pull-left" style="margin-top:0.25em;margin-left:-0.70em">
<input type="checkbox" id="cb_project_status" name="cb_project_status" class="switch" data-size="mini" data-on-color="success" data-off-text="Inactive" data-on-text="Active" data-off-color="warning">
</div>
Using JQuery I am trying to dynamically set the status
if(dataset["PROJECT_STATUS"]=="ACTIVE"){
$('#cb_project_status').bootstrapSwitch('setState', true, true);
}else{
$('#cb_project_status').bootstrapSwitch('setState', false, true);
}
I am getting the above error thrown from line 13533 of bootstrap-switch.min.js Any idea why this is happening?