title: How to change order of elements in html using javascript
body: <p>I am creating a simple game that has 9 divisions and each 8 of the divisions have a penguin hidden in them and the 9th one has a monster. Now my game works fine but what I want to do is every time I load the page, arrangement of the divisions should change so as to add randomness to the game.</p>
  
  <p>Here is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    //This code will run after your page loads
    $('body').on('mousedown', '.yeti', function(event) {
      alert("Yaaaarrrr!");
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="gameholder"&gt;
    &lt;div class="title"&gt;&lt;/div&gt;
    &lt;div class="penguin1"&gt;&lt;/div&gt;
    &lt;div class="penguin2"&gt;&lt;/div&gt;
    &lt;div class="penguin3"&gt;&lt;/div&gt;
    &lt;div class="penguin4"&gt;&lt;/div&gt;
    &lt;div class="penguin5"&gt;&lt;/div&gt;
    &lt;div class="penguin6"&gt;&lt;/div&gt;
    &lt;div class="penguin7"&gt;&lt;/div&gt;
    &lt;div class="penguin8"&gt;&lt;/div&gt;
    &lt;div class="yeti"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>After adding images and some positioning to the <code>div</code>'s this is how it looks</p>
  
  <p><img src="https://i.stack.imgur.com/AeyVL.png" alt=":"></p>