Titre du site qui defile
Comment faire pour que le titre de son site défile
Pour cela, il suffit de taper ceci dans "Texte au-dessus du design" (qui est dans "Ajouter un design" ; "Réglages Avancés") :
Code :
<SCRIPT language="JavaScript" title="G1SCRIPT"> <br /> var message="Le titre de votre site"<!---------Là tu mets ton titre-------> <br /> var message=message+" " <br /> //gives a pause at the end,1 space=1 speed unit, here I used 10 spaces@150 each = 1.5seconds. <br /> i="0" <br /> //declares the variable and sets it to start at 0 <br /> var temptitle="" <br /> //declares the variable and sets it to have no value yet. <br /> var speed="150" <br /> //the delay in milliseconds between letters <br /> function titler(){ <br /> if (!document.all&&!document.getElementById) <br /> return <br /> document.title=temptitle+message.charAt(i) <br /> //sets the initial title <br /> temptitle=temptitle+message.charAt(i) <br /> //increases the title by one letter <br /> i++ <br /> //increments the counter <br /> if(i==message.length) <br /> //determines the end of the message <br /> { <br /> i="0" <br /> //resets the counter at the end of the message <br /> temptitle="" <br /> //resets the title to a blank value <br /> } <br /> setTimeout("titler()",speed) <br /> //Restarts. Remove line for no-repeat. <br /> } <br /> window.onload=titler <br /> </SCRIPT>
Code :
<SCRIPT language="JavaScript" title="G1SCRIPT"> <br /> var message="Le titre de votre site"<!---------Là tu mets ton titre-------> <br /> var message=message+" " <br /> //gives a pause at the end,1 space=1 speed unit, here I used 10 spaces@150 each = 1.5seconds. <br /> i="0" <br /> //declares the variable and sets it to start at 0 <br /> var temptitle="" <br /> //declares the variable and sets it to have no value yet. <br /> var speed="150" <br /> //the delay in milliseconds between letters <br /> function titler(){ <br /> if (!document.all&&!document.getElementById) <br /> return <br /> document.title=temptitle+message.charAt(i) <br /> //sets the initial title <br /> temptitle=temptitle+message.charAt(i) <br /> //increases the title by one letter <br /> i++ <br /> //increments the counter <br /> if(i==message.length) <br /> //determines the end of the message <br /> { <br /> i="0" <br /> //resets the counter at the end of the message <br /> temptitle="" <br /> //resets the title to a blank value <br /> } <br /> setTimeout("titler()",speed) <br /> //Restarts. Remove line for no-repeat. <br /> } <br /> window.onload=titler <br /> </SCRIPT>
Voilà, vous savez tout !