0
Next I’m touching the moodle
and 90% of its html is generated via backend, I need to change a <h1 id='courseheader')>Title</h1>
from 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 into a container I have on the same page.
What javascript/Jquery function can I use for this?
I googled but could not express doubt so clearly that could return me answers.
I hope here is clear doubt, anything edits. 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 I would like to take advantage of what already has.
Obs2.: I forgot to mention, I want that h1
together with the other elements inside the container and that it stays inside the tag h1
...
A bit pedantic but it’s interesting to note that what you want is to change one place element gift .
– Pablo Almeida
you want a solution using jquery or vanilla JS?
– Caio Felipe Pereira
In vdd I would like to know the function, using jquery. I even think a question half 'beast' but only needed to know which function to use ... @Caiofelipepereira
– user27585