Next I'm working on moodle
and 90% of the html is generated via backend, I need to change a <h1 id='courseheader')>Title</h1>
of place via javascript since I do not have access to this element, the idea was to remove it from where it is to throw it inside a container that I have on the same page.
What javascript / JQuery function can I use for this?
I searched google but could not express the question in such a clear way that it could return me answers.
I hope that here is clear the doubt, anything edited. Thank you.
Example:
<h1 id='courseheader')>Title</h1>
<div class="container"> Quero retirar o h1 ali de cima e colocá-lo aqui dentro</div>
Note: I could even create a new h1 inside the container via JS but would like to take advantage of what it already has.
Obs2.: I forgot to mention that I want this h1
together with the other elements inside the container and that it stays inside the h1
tag ...