I try to find if a dynamic created <p> have text. '.layer'+count returns my
class but I can not get it to work with .lenght.
if ( ($('.layer'+count).text()).length > 0 ){
alert ('I have text')
}
Any tips on making this work?
Thanx
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.
In your code the paranthesis order was not the right one. It should be
and not
Actually there is no need of the extra
(. You can simply write