FREE CODE Monday, 12.18.2017, 4:29 AM
Main | Registration | Login Welcome Guest | RSS
[ New messages · Members · Forum rules · Search · RSS ]
۞Forum Statistics۞
NEW TOPPIV
HOT TOPPIC
TOP MEMBERS
NEW MEMBERS
  • check code here Have(0) reviews faxuhi
  • Keywords meta Tags Have(0) reviews faxuhi
  • text box Have(0) reviews faxuhi
  • Page description Have(0) reviews faxuhi
  • marquee Have(0) reviews faxuhi
  • print your page Have(0) reviews faxuhi
  • choose your country Have(0) reviews faxuhi
  • check all - unchek all Have(0) reviews faxuhi
  • shadow text Have(0) reviews faxuhi
  • Beautiful text two Have(0) reviews faxuhi
  • Nice menu with java script <p1> Have(2) reviews faxuhi
  • Mouse Clock Have(1) reviews faxuhi
  • HTML table placeholder Have(0) reviews faxuhi
  • Html graphic bullets Have(0) reviews faxuhi
  • Different times of the world by the users choice from a list Have(0) reviews faxuhi
  • Mouseover Alert HTML Script Have(0) reviews faxuhi
  • Redirect to another page and link automatically to other pg Have(0) reviews faxuhi
  • Combo box link box to browse your website easily Have(0) reviews faxuhi
  • Message to user by clicking a button Have(0) reviews faxuhi
  • Background changing color effect Have(0) reviews faxuhi
  • faxuhi[189]Bài
  • mcsnagger0022[0]Bài
  • thinknoodles[0]Bài
  • karaganis888[0]Bài
  • faxuhi [189]Bài
  • mcsnagger0022 [0]Bài
  • thinknoodles [0]Bài
  • karaganis888 [0]Bài
  • Page 1 of 11
    Forum » Web Javascript » Text dance on page » Text dance on page
    Text dance on page
    faxuhiDate: Sunday, 07.24.2011, 12:19 PM | Message # 1
    Colonel
    Group: Administrators
    Messages: 189
    Reputation: 0
    Status: Offline
    Code
    <script language="JavaScript1.2">
    //configure message
    message="Welcome to www.javascriptfreecode.com"
    //animate text in NS6? (0 will turn it off)
    ns6switch=1

    var ns6=document.getElementById&&!document.all
    mes=new Array();
    mes[0]=-1;
    mes[1]=-4;
    mes[2]=-7;mes[3]=-10;
    mes[4]=-7;
    mes[5]=-4;
    mes[6]=-1;
    num=0;
    num2=0;
    txt="";
    function jump0(){
    if (ns6&&!ns6switch){
    jump.innerHTML=message
    return
    }
    if(message.length > 6){
    for(i=0; i != message.length;i++){
    txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
    jump.innerHTML=txt;
    txt="";
    jump1a()
    }
    else{
    alert("Your message is to short")
    }
    }

    function jump1a(){
    nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0
    nfinal.style.left=-num2;
    if(num2 != 9){
    num2=num2+3;
    setTimeout("jump1a()",50)
    }
    else{
    jump1b()
    }
    }

    function jump1b(){
    nfinal.style.left=-num2;
    if(num2 != 0){num2=num2-3;
    setTimeout("jump1b()",50)
    }
    else{
    jump2()
    }
    }

    function jump2(){
    txt="";
    for(i=0;i != message.length;i++){
    if(i+num > -1 && i+num < 7){
    txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
    }
    else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
    }
    jump.innerHTML=txt;
    txt="";
    if(num != (-message.length)){
    num--;
    setTimeout("jump2()",50)}
    else{num=0;
    setTimeout("jump0()",50)}}
    </script>
    </head>
    <body>

    <h2><div id="jumpx" style="color:green"></div></h2>
    <script>
    if (document.all||document.getElementById){
    jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx
    jump0()
    }
    else
    document.write(message)
    </script>
     
    Forum » Web Javascript » Text dance on page » Text dance on page
    Page 1 of 11
    Search:

    Copyright MyCorp © 2017 Website builderuCoz