If I have a varibale that changes on certain conditions how do I select it using Jquery selectors?
var id = 2
alert($('.'+id+ ' .title').val());
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.
your problem here is that you are starting a classname with a number. class names must start with an _ a – or a letter.
switch up your structure so its:
or some variation so that id starts with an underscore, dash, or letter: