Pushing a nested div underneath its ancestor for mobile

Pushing a nested div underneath its ancestor for mobile

Is there a jQuery way to move a nested div underneath its great grandparent for mobile view. Here's what I've started:  https://codepen.io/Codewalker/pen/aaPRrz 

One thought is to create this twice, hiding one and showing the other, depending on the device/width.

  1. <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type="text/css" rel="stylesheet">

  2. <div class="container" style="background:#ddd">
  3.     <div class="num-container">
  4.         <div class="num-thumb">
  5.             <img src="https://dummyimage.com/71x389/000000/fff&text=Side" class="img-responsive imgNum">
  6.         </div>
  7.         <div class="num-content" style="background:#ddd">
  8.             <h2 class="num-title">Grandparent goes right here</h2>
  9.             <p>This along with that image off to the left is the grandparent div. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. </p>
  10.             <div class="row">
  11.                 <div class="col-sm-5">
  12.                     <h5>Content col-sm-5</h5>
  13.                     <p>Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. </p>
  14.                 </div>
  15.                 <div class="col-sm-7" style="background:orange">
  16.                     <div class="vid-container">
  17.                         <div class="vid-thumb">
  18.                             <img src="https://dummyimage.com/17x158/000000/fff" />
  19.                         </div>
  20.                         <div class="vid-content">
  21.                           <h5>Content col-sm-7</h5>
  22.                           <p>For mobile devices, this orange div needs to wrap underneath the entire gray div. For mobile devices, this needs to wrap underneath the entire gray div.For mobile devices, this needs to wrap underneath the entire gray div.For mobile devices, this needs to wrap underneath the entire gray div.For mobile devices, this needs to wrap underneath the entire gray div. </p>
  23.                         </div>
  24.                     </div>
  25.                 </div>
  26.             </div>
  27.         </div>
  28.     </div>
  29. </div>