I have written a javascript function that uses setInterval to manipulate a string every tenth of a second for a certain number of iterations.
function timer(
var counter = 15; var interval = setTimeout(function(){ // your interval code here window.counter = dynamicValue; interval(); }, counter);