title: Selecting HTML radio buttons using jQuery.eq()
body: <p>I have 3 pairs of radio buttons named "gender[]" in my form. I want to check the first value of each pair using jQuery. I was thinking that this would do the trick:</p>
  
  <pre><code>jQuery('[name="gender\\[\\]"]:eq(1)').attr('checked', 'checked');
  jQuery('[name="gender\\[\\]"]:eq(2)').attr('checked', 'checked');
  jQuery('[name="gender\\[\\]"]:eq(3)').attr('checked', 'checked');
  </code></pre>
  
  <p>Instead, this code only checks the second value of the second pair (?). If I do:</p>
  
  <pre><code>jQuery('[name="gender\\[\\]"]:eq(1)').attr('checked', 'checked');
  </code></pre>
  
  <p>The second value of the first pair is check, which is normal. But then if I have one line of code like this:</p>
  
  <pre><code>jQuery('[name="gender\\[\\]"]:eq(1)').attr('checked', 'checked');
  jQuery('[name="gender\\[\\]"]:eq(2)').attr('checked', 'checked');
  </code></pre>
  
  <p>The first value of the second pair is checked. But the first pair is entirely unchecked, as if the second line of code "cancelled" the first one.</p>
  
  <p>What on earth is going on and how to check the first value of each pair?</p>