title: Toggle Button in goRatchet Framework
body: <p>Can anyone please show me the code for toggle button in ratchet framework. i mean if toggle button is enable {do something} else{do something else}. i didnt got it anywhere in web.</p>
  
  <pre><code>&lt;div  id="myToggle" class="toggle active"&gt;
          &lt;div class="toggle-handle"&gt;&lt;/div&gt;
      &lt;/div&gt;  
      &lt;script type="text/javascript" charset="utf-8"&gt;
      document.querySelector('#myToggle').addEventListener('toggle', myFunction)
      function myFunction()
      {
          if(document.getElementById("myToggle").className == 'toggle active')
          {
          document.getElementById("demo").innerHTML="ON";
          }
          else
          {
          document.getElementById("demo").innerHTML="OFF";
          }
  
      };
      &lt;/script&gt;
  </code></pre>
  
  <p>For others who face the problem.The above code worked for me.</p>