title: jQuery checkbox check/uncheck
body: <p>What would be a proper way to check/uncheck checkbox that's placed inside the element that triggers my function?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;table id="news_list"&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;input type="checkbox" name="news[1]" /&gt;&lt;/td&gt;
      &lt;td&gt;TEXT&lt;/td&gt;
  &lt;/tr&gt;&lt;/table&gt;
  
  $("#news_list tr").click(function() {
      var ele = $(this).find('input');
      if(ele.is(':checked')){
          ele.removeAttr('checked');
          $(this).removeClass('admin_checked');
      }else{
          ele.attr('checked', 'checked');
          $(this).addClass('admin_checked');
      }
  });
  </code></pre>
  
  <p>The problem is I can check and uncheck each box only once. After I've checked and unchecked sometimes it still does add/remove class, but never checking a box again (even when I click on checkbox, not table row).</p>
  
  <p>I've tried using .bind('click') trigger, but it's the same result.</p>
  
  <p>Any solutions?</p>