I am creating a background color animation with jQuery and the color animation plugin
http://plugins.jquery.com/project/color
How do I have a function stay in a loop repeating itself each time it has finished running? I tried this but it did not work :
$(document).ready(function(){
function colorLoop(){
$("#window")
.animate({ backgroundColor: "orange" }, 11000)
.animate({ backgroundColor: "yellow" }, 1000)
.animate({ backgroundColor: "green" }, 1000)
.animate({ backgroundColor: "blue" }, 1000)
.animate({ backgroundColor: "indigo" }, 1000)
.animate({ backgroundColor: "violet" }, 1000)
.animate({ backgroundColor: "red" }, 1000, colorLoop);
};
});