jQuery : Select previous checkbox which is selected
<p>I have a textbox, which upon a change in text, calls some Javascript.</p>

<p>Before this textbox, I have 2 checkboxes (chkA, chkB) which are mutually exclusive.
When I start my new function I want to be able to check which checkbox is currently selected. So far I have this,</p>

<pre><code>   $(".textbox1").keyup(function () {
                var chk = $(this).prevAll(":checked").first().attr('class');  ....

    });
</code></pre>

<p>The code goes on to do a "If class = blah, then do something, else, do nothing"</p>

<p>it worked for my radio button code, but not my checkboxes. "chk" ends up being null.</p>
