Home / code / javascript / scripts

Statusbar, scroll text

Writer: Christophe Wolfs
Published: 27 March 2008

Script that lets the text scroll in the status bar. You can see the example in the statusbar below. Just copy everything and place it in the head-part.

<script language="JavaScript">
/*
Script that scrolls the text in the status bar.
Find more at http://www.webmaster2020.com
*/

var scrolltext="Welcome to webmaster2020";
var scrollcounter=0;
var speed=30;
var i=0;

while(i++<80) scrolltext=" "+scrolltext;

function Statusbarscroll()
{
  window.status=scrolltext.substring(scrollcounter++,scrolltext.length);
  scrollcounter %= scrolltext.length; 
  setTimeout("Statusbarscroll()",speed);
}

Statusbarscroll();
</script>

 

TOP