i have a div:
<div id="div"></div>
with
$("#div").append("<div id='c'></div>")
$("#c").length
returns 0. what i can do for find the div width id = c after inserted in div #div?
thanks
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 does work for me: http://jsfiddle.net/4Q4cM/
Maybe
#divelement isn’t appended to DOM tree itself? E.g., you’re doing$('<div id="div"></div>')instead of inserting it in the document. Nick Craver also has a good guess.