I need assistance with reordering div elements using JavaScript, as I am unsure of how to accomplish this task.
Specifically, I have two divs implemented in HTML, and I would like the div with id="navigation" to appear after the div with class="row subheader".
<div id="navigation">
<div class="item" style="display:inline;">
<a href="index.html">Home</a>
</div>
<div class="item" style="display:inline;">Blog: Kannu</div>
</div>
<div class="row subheader">
<div class="container">
<div id="blogsubheader">My Blog</div>
</div>
</div>
I am looking for a solution using JavaScript similar to the following format:
<div class="row subheader">
<div class="container">
<div id="blogsubheader">My Blog</div>
</div>
</div>
<div id="navigation">
<div class="item" style="display:inline;">
<a href="index.html">Home</a>
</div>
<div class="item" style="display:inline;">Blog: Kannu</div>
</div>
Any help would be greatly appreciated. Thank you!