I’m just curious if it’s possible to move a div tag to another position in the DOM?
Share
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.
Yes. To move
<div id="div1" />inside<div id="div2" />, you can do this:Any of the
appendTo,insertAfter,append, etc. methods will “move” a tag to another location. You can find a list of available jQuery functions here.