I was hoping someone could show me efficient JQuery to animate between 4 background colors in a div class.
I would like these events to be triggered by time, not cli
I'm sure there are better ways to do this, but just to show you a simple way of accomplishing this...
http://jsfiddle.net/UnsungHero97/QLPbW/5/
You want to use the window.setInterval() function...
window.setInterval(rotateBG, 1000); // 1000 = 1 second
function rotateBG() {
// logic to rotate background
}
I hope this helps.