title: Bootstrap Switch - Change state after clicking on button
body: <p>I am using <a href="http://www.bootstrap-switch.org/" rel="noreferrer">Bootstrap Switch</a> plugin and Bootstrap Modal. Once the user clicks to change the Switch from <code>on</code> to <code>off</code> the Modal box fades in asking for a confirmation.</p>
  
  <p>How do I change the Switch from <code>on</code> to <code>off</code> or from <code>off</code> to <code>on</code> only after the user clicks on Confirm button? If the user clicks on Cancel then the Switch should go back to <code>Off</code> status.</p>
  
  <p><strong><a href="http://jsfiddle.net/brunodd/0owp23ug/2/" rel="noreferrer">My code</a></strong></p>
  
  <pre><code>$("#myswitch").bootstrapSwitch();
  
  $('#myswitch').on('switchChange.bootstrapSwitch', function (e, data) {
  
      $('#showModal').modal({
       backdrop: 'static',
       keyboard: false
   });
  });
  </code></pre>