[jQuery] Re: Finding a matching class to a variable

2008-02-22 Thread Karl Swedberg
Hi Philip, What you need to do in this case is concatenate the variable, so that it's not part of the string. Try this: $(div[class*= + $i + ]); That is provided that $i represents the className and not a jQuery object or a DOM element with that className. I hope that helps. --Karl

[jQuery] Re: Finding a matching class to a variable

2008-02-22 Thread Jonathan Sharp
Hi Philip, I'm not sure if you're attempting a partial match but you may also find the following works: $('div.' + $i) Cheers, -Jonathan On Fri, Feb 22, 2008 at 8:40 PM, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Philip, What you need to do in this case is concatenate the variable, so