ID/Class Selector

Posted by Ionut Staicu on Stack Overflow See other posts from Stack Overflow or by Ionut Staicu
Published on 2010-03-18T21:42:02Z Indexed on 2010/03/18 21:51 UTC
Read the original article Hit count: 344

Filed under:

Hi. I have some kind of problem with jQuery selectors.

Let's say i want to select $('#elementID') but the elementID is a variable.

There is any other possiblity to do this other way than var variable = elementID; $('#'+variable) ? I mean without specifying the # anywhere else?

Thanks!

© Stack Overflow or respective owner

Related posts about jQuery