you can try $('#' + tabtext) since the id is unic you don't need the class.
On Jan 30, 7:24 am, studiobl <[EMAIL PROTECTED]> wrote: > I'm having trouble with a jQuery selector that contains a variable. > I'm trying to target an element that has a class of "orderInfo" and an > id of "billy" > > So, I set a variable: > > var tabText = "billy"; > > ...and it works if I use the string: > > $(".orderInfo[id='billy'"]; > > ...but not the variable: > > $(".orderInfo[id=tabTest"]; > > ...but of course I need it to work with a variable {insert appropriate > emoticon here}