Here is the code:
<div id="divFrame"> <div> <img /> </div> <div> </div> <p> </p> </div>
I want to select all these elements.
I have tried the following with no luck
#divFrame *
#divFrame > *
Any idea ?
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.
Neither will select all elements. The first will select all descendants (children and grandchildren), while the second only selects the children of the div, namely the two divs and the p, but not the img. Neither will select #divFrame itself.
To select them all, you will need
This is actionally a combination of two selectors. The first selects #divFrame while the second selects all its descendants.