title: jquery toggle switch programmatcally on off
body: <p>Hi Im using jquery ui toggleswitch 
  <a href="https://github.com/jamiebicknell/Toggle-Switch/blob/master/example.html" rel="nofollow">toggleswitch.js</a> I can get on off value but</p>
  
  <p>how can i set on /off value programmatically in javascript or jquery</p>
  
  <p>i'm using this code on change but i want to set it on document ready</p>
  
  <pre><code>  $('.toggleEmailStatus').toggleSwitch().change(function (ev) {
          alert(ev);
          try {
  
              console.log("value= " + $(this).val());
  
          } catch (e) {
              alert(e);
          }     
   });
  </code></pre>