title: show and hide divs based on radio button click
body: <p>I want to be able to dynamically change what divs are show using radio button and jQuery  -  HTML: </p>
  
  <pre><code>  &lt;div id="myRadioGroup"&gt;
  
  2 Cars&lt;input type="radio" name="cars" checked="checked" value="2"  /&gt;
  
  3 Cars&lt;input type="radio" name="cars" value="3" /&gt;
  
  &lt;div id="twoCarDiv"&gt;
  2 Cars Selected
  &lt;/div&gt;
  &lt;div id="threeCarDiv"&gt;
  3 Cars
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the jQuery: </p>
  
  <pre><code>     &lt;script&gt;
  $(document).ready(function(){ 
      $("input[name$='cars']").click(function() {
          var test = $(this).val();
          $("div.desc").hide();
          $("#"+test).show();
      }); 
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>This does nothing , the divs always show. Im sure this is simple, but Im poor at jQuery . </p>