[jQuery] Re: nth-child(n) not working for me.

2008-09-18 Thread Karl Swedberg
Do people really put elements in a ? Figured they would just use . Hadn't considered 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

[jQuery] Re: nth-child(n) not working for me - I didn't see my previous post

2008-09-18 Thread kcharles
You rock! That was it. -Kevin

[jQuery] Re: nth-child(n) not working for me.

2008-09-18 Thread Richard D. Worth
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

[jQuery] Re: nth-child(n) not working for me.

2008-09-17 Thread Karl Swedberg
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 s

[jQuery] Re: nth-child(n) not working for me - I didn't see my previous post

2008-09-17 Thread ricardobeat
You're not really referencing the 'n' variable you just defined, as you're passing a string. var n = 2; $("#filterTable tbody tr td:nth-child("+n+")").each(function(){ On Sep 17, 2:24 pm, kcharles <[EMAIL PROTECTED]> wrote: > I switch between var n = 2; nth-child(n) and nth-child(2) and get > d