Can I query the DOM with $() using a string variable as a parameter?
i.e.
var divContainerID = "divBlock1";
$(divContainerID).show();
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It should be:
if
divContainerIDis an actual id of an element orif it’s a class (which I’m kind of assuming it isn’t, but I thought I’d give it to you anyway).