Simple jQuery Checkbox Code for Row Select
<p>This code is meant to do the simple task of:</p>

<p>a) Checking the checkbox that exists in the table's <code>&lt;tr&gt;</code> row.</p>

<p>b) Adding the "selected" class to the <code>&lt;tr&gt;</code> row.</p>

<p>While it does B without problem, I cannot get it to do A.  I have tried every type of jQuery selector including input[name='checked_136'], 'input.action_items', etc. and I just can't get it to mark it as checked.  I've also tried used thing attr('checked',true) to check it but that doesn't make a difference.</p>

<p>Does anyone have some insight?</p>

<pre><code>$('table.dataset tbody tr').click(function () {
    var this_row = $(this);
    var checkbox = $(this).children('input.action_items');

    if (checkbox) {
     this_row.children(':checkbox').trigger('click');
     this_row.addClass('selected');
    }
});
</code></pre>
