title: Applying a random background colour to multiple DIVs
body: <p>I have a series of DIVs on the page (each with the same class). On load, I'd like to randomise the colour of each DIV.</p>
  
  <p>I'd like a colour to be chosen for a given DIV, then a colour chosen for the next one and so on.</p>
  
  <p>I found this post: <a href="https://stackoverflow.com/questions/1535128/apply-random-color-to-class-elements-individually">Apply random color to class elements individually?</a></p>
  
  <p>I don't understand jquery, however I have begun by changing the code to reflect the name of the class I am using:</p>
  
  <pre><code>$(document).ready(function() {
  $('.main').each(function () {
      var hue = 'rgb(' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ')';
      $(.jump-response).css("background-color", hue);
  });
  });
  </code></pre>
  
  <p>Further help would be much appreciated!</p>
  
  <p>--</p>
  
  <p>Code example here: <a href="http://jsfiddle.net/ollyf/LmwYP/" rel="nofollow noreferrer">http://jsfiddle.net/ollyf/LmwYP/</a></p>
  
  <p>And I should also add the random background colour is from a preset/predetermined list of colours.</p>