title: Toggle button/switcher to open a URL
body: <p>I've this jquery:</p>
  
  <pre><code>&lt;div class="slider-frame"&gt;
      &lt;span class="slider-button"&gt;Change&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>$('.slider-button').toggle(function() {
      $(this).addClass('on').html('Home');
  },function(){
      $(this).removeClass('on').html('Away');
  });​
  </code></pre>
  
  <p>For the full code see <a href="http://jsfiddle.net/vY7SQ/155/" rel="nofollow">this fiddle</a>.</p>
  
  <p>I need that when users change the button status (home -> away and vice versa) it opens a URL, e.g. when I slide on Away, I need to open <code>www.mysite.com/away</code> and when I slide on "Home" It open <code>www.mysite.com/home</code>.</p>
  
  <p>Thanks in advance for the help.</p>