How To Add Scrolling Text to Status Bar

1.Login to your blogger dashboard and go to Layout --> Page Elements.

2.Click on 'Add a Gadget' on the sidebar.

3.Select 'HTML/Javascript' and add the one of code given below and click save.

<script language=javascript>
function statusbar(val)
{
var msg = "TYPE-YOUR-MESSAGE-HERE";
var res = " ";
var speed = 100;
var pos = val;

if (pos > 0) {
for (var position=0 ; position< pos; position++) {
res += " ";
}
res+=msg;
pos--;
window.status = res;
timer = window.setTimeout("statusbar("+pos+")",speed);
}
else{
if( -pos < msg.length) {
res += msg.substring(-pos,msg.length);
pos--;
window.status=res;
timer = window.setTimeout("statusbar("+pos+")",speed);
}
else
{
window.status= " ";
timer = window.setTimeout("statusbar(100)",speed);
}
}
}
statusbar(100);
</script>


Now you are done.

0 comments:

Post a Comment

 

Support By Blogger