title: Redirect browser based on radio button value
body: <p>Is there an easier way to redirect the browser based on the selection from a radio button? This works but from what I'm reading on the world wide web there is probably an easier way. </p>
  
  <p>This is my form:</p>
  
  <pre><code>&lt;form&gt;
  &lt;input type="radio" name="value" value="google"&gt;&lt;span&gt;Google&lt;/span&gt;&lt;br&gt;
  &lt;input type="radio" name="value" value="yahoo"&gt;&lt;span&gt;Yahoo&lt;/span&gt;&lt;br&gt;
  &lt;input type="radio" name="value" value="bing"&gt;&lt;span&gt;Bing&lt;/span&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is my jquery:</p>
  
  <pre><code>$(function() {
  $("input[name$='value']").click(function() {
      var value = $(this).val();
      if (value == 'google') {
          window.location.assign("http://www.google.com");
      }
      else if (value == 'yahoo') {
          window.location.assign("http://www.yahoo.com");
      }
      else if (value == 'bing') {
          window.location.assign("http://www.bing.com");
      }
  });});
  </code></pre>
  
  <p>Thanks in advance</p>