title: Change order of divs using javascript
body: <p>I have somthing like that:</p>
  
  <pre><code>&lt;div&gt;
  
     &lt;div id = "a"/&gt;
     &lt;div id = "b"/&gt;
     &lt;div id = "c"/&gt;
     &lt;div id = "d"/&gt;
     &lt;div id = "e"/&gt;
     &lt;div id = "f"/&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>And I want that in some cases it will be like that, and in some cases it will
  extacly reversed:</p>
  
  <pre><code>&lt;div&gt;
  
     &lt;div id = "f"/&gt;
     &lt;div id = "e"/&gt;
     &lt;div id = "d"/&gt;
     &lt;div id = "c"/&gt;
     &lt;div id = "b"/&gt;
     &lt;div id = "a"/&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I looking for some solution in javascript,
  anyone have any idea.</p>