title: change background image in loop
body: <p>i want to change background image of page using <code>jQuery</code> onclick would look like this:</p>
  
  <pre><code>var colors = ['blue', 'green', 'yellow', 'black'];
  $('#click').click(function(){
      $('body').css('background', colors[1]);
  })
  </code></pre>
  
  <p>but i want to change it automatically using some short of 'jQuery` function, my try so far is this :</p>
  
  <pre><code>var colors = ['blue', 'green', 'yellow', 'black'];
  
  $.each(colors, function(color){
      setTimeout(function(){$('body').css('background', color)}, 1000);
  });
  </code></pre>
  
  <p>but it doesn't work, any help would be appreciated</p>