Hi I have a div with content like this
<div><strong>some content
....</strong></div>
How can I add another element to the div after <strong>, how to add <span> element after <strong> ?
Thank you
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.
Just use
appendon yourdivelement:It will insert the
spanelement inside thediv, at the end of the child node list.Edit: In response to your comment, to remove it, since you added the element with
append, you can get it selecting the last-child:Or you could remove all the
spanelements within thediv: