»
EnglishFrenchVietnamese

Print - Dynamic Substring Effect script - JavaScriptBank.com

Full version: jsB@nk » Text » Animation » Dynamic Substring Effect script
URL: http://www.javascriptbank.com/dynamic-substring-effect-script.html

Dynamic Substring Effect script © JavaScriptBank.comDynamic Substring is a cool text effect to add to your site. Modifies Positions of a span tag.

Full version: jsB@nk » Text » Animation » Dynamic Substring Effect script
URL: http://www.javascriptbank.com/dynamic-substring-effect-script.html



CSS
<STYLE type=text/css>BODY {BACKGROUND-COLOR: black}SPAN.scripts {COLOR: white; FONT-SIZE: 25px; FONT-WEIGHT: bold; POSITION: relative; VISIBILITY: visible; Z-INDEX: 3}A {COLOR: lightyellow; FONT-SIZE: 20px; FONT-WEIGHT: bold; LETTER-SPACING: 3px}A:hover {COLOR: #00ff00}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript type=text/javascript>var message=new Array("JavaScriptBank.com", "Bank of over 2000+ free JavaScripts");var POSTOP=50;var POSLEFT=80;var posTP=POSTOP,posTN=-(POSTOP),posLP=POSLEFT,posLN=-(POSLEFT);var gcount=0,bcount=0,fcount=255,bcount2=255,fcount2=0;var count=0;var bool=true;var spans=new Array(5);function Hucko(){ for(var x=0;x<spans.length;x++) {  spans[x]=document.getElementById('sid'+x);if(x!=2)  setSpanID(x);  spans[x].onclick=DYNAMICSCRIPTS; }  Richard_Huckos_effect();// - Check Out http://jsbank.topcities.com}function setSpanID(IDno){ switch(IDno)  {case 0:     with(spans[0].style)  {    top=POSTOP;visibility="hidden";  }  break;  case 1: with(spans[1].style)  {    left=POSLEFT;visibility="hidden";  }break;case 3: with(spans[3].style)  {    left=-(POSLEFT);visibility="hidden";  }break;case 4: // http://jsbank.topcities.com  with(spans[4].style)  {    top=-(POSTOP);visibility="hidden";  }}}function Richard_Huckos_effect(){ if(posTP>-20&&gcount<message.length) {  if(gcount==message.length-1){ with(spans[2].style) {   color="#00ff00"; }}   spans[4].innerHTML=spans[3].innerHTML=spans[2].innerHTML=spans[1].innerHTML=spans[0].innerHTML=message[gcount];  for(var x=0;x<spans.length;x++)   spans[x].style.visibility="visible";   spans[0].style.top=posTP; spans[0].style.left=posLP; spans[1].style.left=posLP; spans[1].style.top=posTP; spans[3].style.left=posLN; spans[3].style.top=posTN; spans[4].style.top=posTN; spans[4].style.left=posLN;   posTP--;posLP-=2;posLN+=2;posTN++; } else if(gcount<message.length) {  gcount++;posTP=POSTOP,posTN=-(POSTOP),posLP=POSLEFT,posLN=-(POSLEFT); } else if(bool==true) {  if(count>=5) bool=false; count++; } else {  for(var x=0;x<spans.length;x++)  {   spans[x]=document.getElementById('sid'+x); if(x!=2)   setSpanID(x);  }spans[2].style.color="white";if(bcount<255){ document.getElementById('bid0').style.backgroundColor="rgb("+bcount+","+bcount+","+bcount+")"; document.getElementById('sid2').style.color="rgb("+fcount+","+fcount+","+fcount+")"; bcount+=5;fcount+=5;}else if(bcount2>=0){ document.getElementById('bid0').style.backgroundColor="rgb("+bcount2+","+bcount2+","+bcount2+")"; document.getElementById('sid2').style.color="rgb("+fcount2+","+fcount2+","+fcount2+")";  bcount2-=5;fcount2-=5;}   clearTimeout('timer'); } timer=setTimeout("Richard_Huckos_effect();",16); // - 2004 Splash Intro Page JavaScript Effect}function DYNAMICSCRIPTS(){  location.replace("http://jsbank.topcities.com");}window.onload=Hucko;</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<SPAN class=scripts id=sid0 style="COLOR: blue"></SPAN><BR><SPAN class=scripts id=sid1 style="COLOR: blue"></SPAN><SPAN class=scripts id=sid2></SPAN><SPAN class=scripts id=sid3 style="COLOR: blue"></SPAN><BR><SPAN class=scripts id=sid4 style="COLOR: blue"></SPAN><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->