Hi, I’ve got this hybrid js + jQuery script that actually works: it uses a series of setTimeouts to call a sequence of jQuery color-changes; and then loops them. Callbacks got too complicated for me.
Can’t figure how to stop it: I’ve looked at clearInterval(), and at jQuery’s stop(), but haven’t gotten either to work yet. Would appreciate suggestions.
The stop needs to be a separate function, not integrated into the function itself.
.myclass {color:#000;}
function slowPulse() {
{$(“.myclass”).animate( {color:”#363300″}, 2000) };
setTimeout( ‘{$(“.myclass”).animate( {color:”#003336″}, 4000) }’, 2001);
setTimeout( ‘{$(“.myclass”).animate( {color:”#000″}, 2000) }’, 6003);
setTimeout( function() { setTimeout(‘slowPulse()’, 1000) }, 8004);
}
cheers