<div class="outer">
<ul>
<li> list one </li>
<li> list two </li>
<li> list three </li>
<li> list four </li>
<li> list five </li>
<li> list six </li>
</ul>
</div>
$( ".outer-grid" ).appendTo( ".outer" );
I am looking for a way to insert a new div within another existing div using JavaScript. Specifically, I need to insert a div with the class "outer-grid" inside the div with the class "outer", while ensuring that all the list items ("li") are contained within this newly added div. The code snippet above illustrates what I have so far. Your assistance in accomplishing this task would be greatly appreciated. Thank you!