I just have a div with the background color covering the entire view called "colorPanel" (using html id).
This code does not run and I don't understand why.
When I change col to $col, it still does not run.
What am I not understanding about jquery?
function animateColors(i){
var val = 1/0.2*(i) * 210;
var col = 'hsla('+val+', 90%, 60%, 1)';
$("#colorPanel").animate({"background-color": col}, 200);
i = (i<180)? i+4 : 0;
animateColors(i);
}
animateColors();
animateColors(). Is this a typeo? If notiis undefined for the initial run of the program. Also there is no terminating condition for your recursive function.