title: How to get selected value from a Flip Switch or Toggle Switch
body: <pre><code>&lt;div class="table-thing with-label widget uib_w_114 d-margins" data-uib="app_framework/flip_switch" data-ver="1"&gt;
      &lt;label class="narrow-control label-inline"&gt;Notifications&lt;/label&gt;
      &lt;div class="wide-control"&gt;
          &lt;input type="checkbox" class="toggle" id="af-flipswitch-1" name="af-flipswitch-1" checked="checked"&gt;
          &lt;label for="af-flipswitch-1" data-off="Off" data-on="On"&gt;
              &lt;span&gt;&lt;/span&gt;
          &lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am not sure how to get the value from the flip switch (On or Off) and assign to a javascript variable.</p>
  
  <p><strong>Edit: The above code is from App Designer (Intel XDK)</strong></p>
  
  <p>To get the value use,</p>
  
  <pre><code>    if ($('#af-flipswitch-1').is(":checked"))
              {
      console.log("On");
          } else {
               console.log("Off");
              }
  </code></pre>