Crafted this real quick for an example:
e = document.getElementById('STACKME');
ticker=0;
checkloop = setInterval(function(){
console.log(e);
ticker++;
if(ticker > 5){
clearInterval(checkloop);
}
}, 100);
See on jsFiddle : http://jsfiddle.net/jzau7bhf/1/
Now, I could simply just use that code above and it times perfectly with that given text. Problem is.. if that text is let's say.. over 2000 characters long, this script wouldn't be accurate and the timing would be off.
With that said, is it possible to check if the <marquee>
attribute has finished looping?