title: Wordpress - Changing Background-Color of Multiple Divs
body: <p>I have multiple DIV elements on my page with the class "grid-item-container"</p>
  
  <p>I want to make the background-color of each one different. I will set an array of 5 different colours that can be set.</p>
  
  <p>There is a script available here that seems to do this: <a href="http://jsfiddle.net/VXG36/1/" rel="nofollow">http://jsfiddle.net/VXG36/1/</a></p>
  
  <pre><code>$(document).ready(function() {
  var randomColors = ["green","yellow","red","blue","orange","pink","cyan"];
  $(".random").each(function(index) {
      var len = randomColors.length;
      var randomNum = Math.floor(Math.random()*len);
      $(this).css("backgroundColor",randomColors[randomNum]);
      //Removes color from array so it can't be used again
      randomColors.splice(randomNum, 1);
  });
  });
  </code></pre>
  
  <p>I cannot however get it to run on my page. Is there something in this script that needs to be amended to make it Wordpress friendly?</p>
  
  <p>Kind regards
  Dave</p>