title: Jquery find a checkbox inside a table row
body: <p>My html</p>
  
  <pre><code>&lt;TR class="datarow" id="rowId"&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;895171&lt;/TD&gt;&lt;td class="classID"&gt;&lt;INPUT type="checkbox" /&gt;&lt;/TD&gt;&lt;/TR&gt;
  </code></pre>
  
  <p>how do I use Jquery to find out whether the checkbox in this particular row is checked or not. Assume that i know the unique rowId.</p>
  
  <p>Currently, I am doing this</p>
  
  <pre><code>var checkbox = $('#' + rowId + " td input:checkbox");
  
          if (checkbox.checked) {
             alert("checked");
          } else {
             alert("unchecked");
          }
  </code></pre>
  
  <p>But this doesn't seem to detect when the checkbox is checked.</p>
  
  <p>EDITED
  Curiously, the following didn't work either:</p>
  
  <pre><code>        var curRow = $('#' + curRowId);
          var checkbox = $(curRow).find('input:checkbox').eq(0);
  
  
  
          if (checkbox.checked) {
             alert("checked");
  
          } else {
             alert("unchecked");
  
          }
  </code></pre>