Do people really put <td> elements in a <thead>? Figured they would just use <th>. Hadn't considered <tfoot> though. Good point.

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 18, 2008, at 5:44 AM, Richard D. Worth wrote:


On Wed, Sep 17, 2008 at 11:29 PM, Karl Swedberg <[EMAIL PROTECTED]> wrote:
Hi kcharles,

you need to concatenate the variable, n, with the rest of the selector expression. Otherwise, it's treated as the string, "n". Try this:

$("#filterTable tbody tr td:nth-child(" + n + ")").each(function(){

Also, you probably don't need either the "tbody" or "tr" part in there since, presumably, any td is going to be within a tr and a tbody.

Having the tbody there filters out any tds in a thead or tfoot. But yeah, the tr can go.

- Richard


Reply via email to