title: jQuery: show / hide Div when first or second radio button is selected
body: <p>I am new to jQuery and hope someone here can help me with this. </p>
  
  <p>I am trying to <strong>show / hide a div</strong> (<code>'requestDetails'</code>) <strong>if the first OR second of a</strong> variable <strong>range of radio buttons is selected</strong> (the reason for this is that I would like to avoid hard-coding specific values to check for). </p>
  
  <p>So far I only have a hard-coded solution but this doesn't work properly and I am not sure about how to address only the first and second radio button without this. </p>
  
  <p>I tried to avoid using IDs or further classes on the radio buttons to reduce code but can add this if recommended. </p>
  
  <p><strong>My jQuery:</strong> </p>
  
  <pre><code>$('[name=requestType]').on('change', function(){
      if( ($('[name=requestType]').val() == 'value1') || ($('[name=requestType]').val() == 'value2') ){
          $('#requestDetails').show();
      }else{
          $('#requestDetails').hide();
      }
  });
  </code></pre>
  
  <p><strong>My HTML:</strong></p>
  
  <pre><code>&lt;input type="radio" name="requestType" value="value1" /&gt;Value1  
  &lt;input type="radio" name="requestType" value="value2" /&gt;Value2  
  &lt;input type="radio" name="requestType" value="value3" /&gt;Value3  
  // ...
  &lt;div id="requestDetails" class="hidden"&gt; ... &lt;/div&gt;
  </code></pre>
  
  <p>Many thanks in advance for any help, 
  Mike</p>