BACK

Rotate the string

IGOR HRISTOV




CODE:

function animate_string(param) {
var element = document.querySelector(param);
var textNode = element.childNodes[0]; // assuming no other children
var text = textNode.data;

setInterval(function () {
text = text[text.length - 1] + text.substring(0, text.length - 1);
textNode.data = text;
}, 200);

}