html - How do I make text inside the title tag animate using JavaScript? -
how show scrolling (moving) message in title?
<title>welcome title</title>
translate titlebar dynamic displays additional information using javascript (without css).
you can add marque in title bar text through javascript. see in blog post add scrolling marquee effects text title bar.
the unmodified contents of page, except formatting:
/* can add moving text title bar of browser website or blog. here code this. add code in website or blog in widget (after replacing text desired text). */ <script language=javascript> var rev = "fwd"; function titlebar(val){ var msg = "your text"; var res = " "; var speed = 100; var pos = val; msg = " |-"+msg+"-|"; var le = msg.length; if(rev == "fwd"){ if(pos < le){ pos = pos+1; scroll = msg.substr(0,pos); document.title = scroll; timer = window.settimeout("titlebar("+pos+")",speed); } else { rev = "bwd"; timer = window.settimeout("titlebar("+pos+")",speed); } } else { if(pos > 0) { pos = pos-1; var ale = le-pos; scrol = msg.substr(ale,le); document.title = scrol; timer = window.settimeout("titlebar("+pos+")",speed); } else { rev = "fwd"; timer = window.settimeout("titlebar("+pos+")",speed); } } } titlebar(0); </script>
Comments
Post a Comment