Issues selecting class in table
<p>I am just diving into jquery, so please excuse any really silly mistakes...</p>

<p>I have a table I am generating from a database. </p>

<pre><code>&lt;table id="DataTable"&gt;
    &lt;tr&gt;
        &lt;th&gt;&lt;input type="button" onclick=doCheck()&gt;&lt;/th&gt;
        &lt;th&gt;col 2&lt;/th&gt;
        &lt;th&gt;col 3&lt;/th&gt;
        &lt;th&gt;col 4&lt;/th&gt;
        &lt;th&gt;col 5&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
        &lt;td&gt;data 2&lt;/td&gt;
        &lt;td&gt;data 3&lt;/td&gt;
        &lt;td&gt;data 4&lt;/td&gt;
        &lt;td class="thisOne"&gt;data 5&lt;/td&gt;
    &lt;/tr&gt;
 .
 .
 .
  &lt;/table&gt;
</code></pre>

<p>I need to perform some validation checks on column5, labeled <code>thisOne</code>, based on whether or not it is in a row where the box is checked. Here is what I have so far:</p>

<pre><code>//Get checkboxes
var boxes = $("#DataTable").find("tr td input[type=checkbox]");
var locations = [];
boxes.each(function (index, element) {
        if ($(element).is(':checked')) {
            //Code here
        }
    });
</code></pre>

<p>In the area marked <code>//code here</code> I have tried many things and have not been able to successfully select the column I want. Some things I have tried (NOTE: I am using <code>Hide()</code> for testing purposes):</p>

<pre><code>$(this).closest("td").next('.thisOne').hide(); Doesn't work
$(this).parent("td").next('.thisOne').hide();  Doesn't Work
$(this).closest("td").hide();                  Works as expected
$(this).closest("td").next().hide();           Works as expected
$('.thisOne').hide();                          Works as expected
</code></pre>

<p>Shouldn't the first line I listed work? <code>.closest()</code> will navigate up to the <code>td</code> level, where <code>.next('thisOne')</code> will traverse the DOM until a <code>td</code> tag with that class is found? Please explain any answers as I am really curious as to why this is not working. Thanks</p>
