title: Programmatically change checked of a checkbox
body: <p>I have the following two checkboxes:</p>
  
  <pre><code>&lt;input type="checkbox" id="id3"&gt;&lt;/input&gt;
  &lt;input  type="checkbox" id="id4"&gt;&lt;/input&gt;
  </code></pre>
  
  <p>the desired behaviour is that when i click on id3, id4 should adopt.</p>
  
  <p>that works fine for the first and second click but aftwerwards not anymore. any idea why?</p>
  
  <p>here my script:</p>
  
  <pre><code>&lt;script&gt;
         function test2()
         {
           var checked = this.checked;
           if(checked)
              $("#id4").attr("checked", "checked");
           else
              $("#id4").removeAttr("checked");
         }    
  
         $("#id3").click(test2);
  &lt;/script&gt;
  </code></pre>
  
  <p>(or a working dojo here <a href="http://dojo.telerik.com/eviTi" rel="nofollow">http://dojo.telerik.com/eviTi</a>)</p>