title: Show and Hide functions in Jquery
body: <p>I wrote a code in html -3 Div's which come after radio buttons.
  I want that a click on each button will show the code that's in the that button's div, and will hide both of the other div's.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;div&gt;
              &lt;form id="A" method="get" action="form.php"&gt; &lt;fieldset&gt;
               &lt;legend&gt; A &lt;/legend&gt;
  
                  &lt;div id="Headline"&gt;Headline: &lt;/div&gt;
                  &lt;div&gt;&lt;input type="radio" name="B" value="B" onclick="functionb('b')"&gt;  &lt;img class="photos" src="b.gif" alt="b"&gt;&lt;br&gt;&lt;div id="b&gt;Show B&lt;/div&gt;
                      &lt;input type="radio" name="C" value="C" onclick="functionc('c')"&gt;&lt;img class="photos" src="c.gif" alt="c"&gt;&lt;br&gt;&lt;div id="c"&gt;Show C&lt;/div&gt;
                      &lt;input type="radio" name="d" value="d" onclick="functiond('d')"&gt;&lt;img class="photos" src="d.gif" alt="d"&gt;&lt;/div&gt;&lt;br&gt;&lt;div id="d"&gt;Show D&lt;/div&gt;
  
               &lt;/fieldset&gt;
          &lt;/form&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I wrote the next code in the JS file (I need to put all the scripts in a different file that the html one) just for the first button:</p>
  
  <pre><code>       $(document).ready(function(){
            $("#b").click(function(){
              $("#b").show();
              $("#c").hide();
              $("#d").hide();
             });
         });
  </code></pre>
  
  <p>and it doesn't do the action needed when pressing the first button...
  Be glad to get any help - thank you!!</p>