Animated/timed text with JavaScript return -


i have following code:

function list() {     return "blob1<br>blob2<br>blob3"; } 

when code run, directly displays whole text in return on call of function.

is there way make display blob1, wait 0.5 seconds, display blob2, after 0.5 more seconds display blob3?

this how might it:

var stack = ["blob1", "blob2", "blob3"];    function nextitem() {      document.body.innerhtml += stack.shift() + "<br>";  }    nextitem();  settimeout(nextitem, 500);  settimeout(nextitem, 1000);


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -