title: Show hidden div to select a Radio button jquery
body: <p>: 
  I want to show a div when the user select the correct choice of a radio button. By default the option to not have to show the div is selected. I would like the right choice when unmarked went back to hide the div. Here's the code.</p>
  
  <p>Form: </p>
  
  <pre><code>&lt;input class="radio" id="re" type="radio" name="recogida" value="domicilio"&gt;
  &lt;input class="radio" type="radio" name="recogida" value="local" checked&gt;&lt;br /&gt;
              &lt;div id="domicilio" class="oculto"&gt;
              &lt;hr /&gt;
              &lt;h3&gt;¿Necesitas cambio?:&lt;/h3&gt;
              &lt;input type="number" name="cambio" min="1" max="500" /&gt;
              &lt;/div&gt;
  
  &lt;style&gt;
   .oculto{
   display:none;
  }
  &lt;/style&gt;
  </code></pre>
  
  <p>Jquery Script option 1:</p>
  
  <pre><code>    $(document).ready(function(){ 
      $("input[name$='recogida']").click(function() {
          var nom = $(this).val();
          $("#"+nom).show();
      }); 
  });
  </code></pre>
  
  <p>Jquery Script option 2:</p>
  
  <pre><code>    $(document).ready(function()
          {
          $(".radio").click(function () {    
              $('#domicilio').toggle(2000);
               });
      });
  </code></pre>
  
  <p>What's the solution? Thanks!!</p>