Jquery - finding values of radio buttons and changing the css of another element
<p>I have a radio button group</p>

<pre><code>&lt;input type="radio" name="Q1" value="Yes /&gt;
&lt;input type="radio" name="Q1" value="No /&gt;
</code></pre>

<p>I also have 2 divs </p>

<pre><code>&lt;div id="Q4" style="display:none"&gt; Some content&lt;/div&gt;
&lt;div id="Q5" style="display:none"&gt; Some content&lt;/div&gt;
</code></pre>

<p>This is what I would like to do using Jquery</p>

<p>If someone clicks radio button with value Yes - set  div id=Q4 to display:block.
If someone clicks radio button with value No - set div id=Q4 to display:none and set div id=Q5 display:block</p>

<p>I have been trying and not very successful. I have used alerts in the jQuery to try and understand what I am doing wrong. Can anyone please help</p>

<pre><code>$('input[type="radio"]').click(function(){
var userClick= $('input:radio[name=Q1]:checked').val();
switch(userClick){
  case 'Yes':
alert('Number1');
   case 'No':
     alert('Number2');    
  }
});
</code></pre>
