[jQuery] Re: Using variables in attribute selectors

2009-01-21 Thread TimG
Hi Liam, Bingo! Thank you so much -- I knew it must be something like that... On Jan 21, 5:06 pm, Liam Potter wrote: > var VarName = something > $("#tree li a[custom="+ VarName +"]").css('background-color', 'yellow'); >

[jQuery] Using variables in attribute selectors

2009-01-21 Thread TimG
I've done a lot of search on this subject but haven't been able to find any examples of using variables in [attribute=xx] selectors, only literals. As far as I can see it doesn't work and I was wondering if there is any way to make it work -- for example with special syntax used in this position.