title: change style with delay and in a loop
body: <p>Im trying to make a div change color in a loop with a little delay between each color change so you can see the color, i have no idea how to do it or what to search for, so now im asking, i have just made a fittle of i how i think i should work, it gives a pretty good idea of what i try to do.</p>
  
  <pre><code>$("#button").click(function(){
       $("#box").css("background-color", "red");
       delay(500);
       $("#box").css("background-color", "yellow");
       delay(500);
       $("#box").css("background-color", "green");
       delay(500);
       $("#box").css("background-color", "purple");
       loop();
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/fud5r/" rel="nofollow">and the fiddle</a></p>