Status Bar Animation – Upcase

[Total: 0    Average: 0/5]

This example shows how you can have some animation in the status window.

Body Code:

<script type=text/javascript>
var text  = "watchh this text go upcase letter by letter.".toLowerCase();
var speed = 200; // 200 milliseconds between letter changes.

var x = 0;

function bb() {
  var a = text.substring(0,x);
  var b = text.substring(x,x+1).toUpperCase();
  var c = text.substring(x+1,text.length);
  defaultStatus = a + b + c;
  x = ++x % text.length;
}

var myTimer = setInterval("bb()",speed);
function xyz() {
  if (myTimer != null) {
    clearInterval(myTimer);
    myTimer = null;
	defaultStatus = defaultStatus.toLowerCase();
  }
}
</script>
<br><a href="javascript:xyz()">stop it</a>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *