With this html:
<label for="DateOfBirth">
<span>* </span>
Date Of Birth:
</label>
How do I select and remove the span element using JQuery?
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.
Like this:
This selector matches all
<span>elements inside<label>elements that have aforattribute ofDateOfBirth.You could also write
span:has('*')to only match<span>elements that contain a*in their text.