I have a string and I need to check if there is in the page a div with id = to my string.
How can i do this with jquery?
Like:
if (isset $(mystring))
// do somethinhg
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.
Have this code either in the bottom of the page or wrapped inside
$(document).ready()function otherwise even if the element exists further in the page it won’t be recognized.