javascript - How to put scrolling text in title tag? -


i want make text of title scrollable, make code under scrolls fine text entered displayed without space, meaning space in string not considered.

<script type="text/javascript">     //function tittle scrolling     function scrlsts() {         //var scrltest = " nature ";         scrltest=document.title;          //alert(scrltest);         scrltest = scrltest.substring(1, scrltest.length) + scrltest.substring(0, 1);          //alert(scrltest);         document.title = scrltest;          settimeout("scrlsts()", 1000);     }     $(document).ready(function() {         var scrltest = " nature dff ssfd ";         document.title=scrltest;         scrlsts();     }); </script>  

thanks in advance

haven't made these long time, but should work:

(function titlescroller(text) {     document.title = text;     settimeout(function () {         titlescroller(text.substr(1) + text.substr(0, 1));     }, 500); }(" nature dff ssfd ")); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -