title: disabling and enabling bootstrap switch using jquery
body: <p>I am using bootstrap switch and currently got stuck as there aren't any strong documentation or examples that I could get access to. </p>
  
  <pre><code>&lt;div class="col-xs-6"&gt;
    &lt;div class="pull-left"&gt;
       &lt;input class="switch" type="checkbox" id="cb_project_status"  name="cb_project_status" 
          &lt;?php if($data_p_projectstatus=="ACTIVE") echo("checked"); else echo("");?&gt; 
          data-on-color="success" data-off-text="Inactive" data-on-text="Active" 
          data-off-color="warning" data-size="mini" disabled&gt;
       &lt;/div&gt; 
   &lt;/div&gt;
  </code></pre>
  
  <p>On document ready of js file, I do</p>
  
  <pre><code>$("#cb_project_status").bootstrapSwitch();
  </code></pre>
  
  <p>and have attached in in the php page</p>
  
  <pre><code> &lt;link rel="stylesheet" href="css/bootstrap-switch.min.css"&gt;
  </code></pre>
  
  <p>I need to achieve the following functionality: Unless user enters all mandatory fields, the switch button needs to be disabled.</p>
  
  <pre><code>if($.fn.validateFormInputs()){
     // enable bootstrap switch
  }else{
     // disable bootstrap switch
  }
  </code></pre>
  
  <p>What is the jQuery command to enable/disable bootstrap switch. Thanks!</p>