title: Adding a toggle on/off switch to rails app
body: <p>I am trying to change a select tag to a js toggle on/off switch in my rails app.</p>
  
  <p>I found a nice simple one on w3schools</p>
  
  <p><a href="http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_forms_select_switch" rel="nofollow">http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_forms_select_switch</a></p>
  
  <p>I added this to my application.js :</p>
  
  <pre><code>&lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"&gt;
  &lt;script src="http://code.jquery.com/jquery-1.8.3.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and then added this script to my view :</p>
  
  <pre><code>&lt;label for="switch"&gt;Toggle Switch:&lt;/label&gt;
      &lt;select name="switch" id="switch" data-role="slider"&gt;
        &lt;option value="on"&gt;On&lt;/option&gt;
        &lt;option value="off"&gt;Off&lt;/option&gt;
      &lt;/select&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>but it doesn't seem to be work. What am I doing wrong?</p>