Use hold() method from StratifiedJS:
<script src="http://code.onilabs.com/apollo/0.13/oni-apollo.js"></script>
<script type="text/sjs">
for (var i = 1; i < 4; i++) {
alert(i);
hold(1000);
}
</script>
Reference:
http://stackoverflow.com/questions/10690801/sleep-function-in-javascript-without-using-recursion
http://onilabs.com/stratifiedjs
No comments:
Post a Comment