For example,
<div id="source">
...
</div>
Elements containing these contents
<div id="destination">
...
</div>
I want to move it in here
<div id="destination">
<div id="source">
...
</div>
</div>
Like this.
html javascript jquery
You can use the appendTo or prependTo function. AppendTo is added to the end of the element The prependTo is added to the beginning of the element.
$("#source")
.appendTo("#destination");
$("#source")
.prependTo("#destination");
You can use it like this.
© 2024 OneMinuteCode. All rights reserved.