title: check checkbox if another checkbox is checked
body: <p>I want the checkbox with the value 2 to automatically get checked if the checkbox with the value 1 is checked. Both have the same id so I can't use getElementById.</p>
  
  <p>html:</p>
  
  <pre><code>&lt;input type="checkbox" value="1" id="user_name"&gt;1&lt;br&gt;
  &lt;input type="checkbox" value="2" id="user_name"&gt;2
  </code></pre>
  
  <p>I tired: </p>
  
  <pre><code>var chk1 = $("input[type="checkbox"][value="1"]");
  var chk2 = $("input[type="checkbox"][value="2"]");
  
  if (chk1:checked)
        chk2.checked = true;
  </code></pre>