title: Switching DOM elements positions arbitrarily
body: <p>I'm building a responsive website that changes widgets' position arbitrarily upon being viewed in different viewport widths. </p>
  
  <p>Visually, its turning this:</p>
  
  <p><img src="https://i.stack.imgur.com/z6oaY.png" alt="big"></p>
  
  <p>Into this:</p>
  
  <p><img src="https://i.imgur.com/0WvzGSI.png" alt="small"></p>
  
  <p>My first approach was setting placeholder div elements in this way:</p>
  
  <pre><code>&lt;div data-change-from=".my-element"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And using <a href="http://responsejs.com/" rel="nofollow noreferrer">response.js</a> to detect widths and move elements around with jQuery, but with complex grids and more widgets it has become unmanageable. </p>
  
  <p>What is an efficient and reliable way to do this ?</p>