»
EnglishFrenchVietnamese

Print - Disappearing Text Effect script - JavaScriptBank.com

Full version: jsB@nk » Text » Animation » Disappearing Text Effect script
URL: https://www.javascriptbank.com/disappearing-text-effect-script.html

Disappearing Text Effect script © JavaScriptBank.comHere's another neat DHTML trick, causing the title to disappear letter by letter. This would be ideal on an entry page to a site.

Full version: jsB@nk » Text » Animation » Disappearing Text Effect script
URL: https://www.javascriptbank.com/disappearing-text-effect-script.html



JavaScript
<SCRIPT language=JavaScript1.2>/*If you want the text to appear differently on another place on the pageor anything set that in the style tag of the zoom layer. Here are the variables you have to set:                                                                 First the text:*/text="JavaScriptBank.com - Bank of over 2000+ free JavaScripts"//set the fontsize you want:var fontsize=28//The color of the textvar color="brown"//the alignment of the text, you can choose center, right or left.var align="left"//Set the speed you want it to write in (in milliseconds between each letter)var Wspeed=100//Set fontvar font='Arial,Helvetica, sans-serif'  //Set the time you want it to wait before it starts after pageload:var timetowait=1000        /*You can remove this if you don't wan't it to start right away.You can have it start if someone clicks a link (make a link like this:<a href="#" onclick="writeInit()">Click to writetext</a>)*/onload=writeInit;/*You shouldn't really have to set anything below this point*************************************************************************************************************************************************************************************************************************************//*Browsercheck and settings vars****************************************************************************/var ie, n;if (document.all) {n=0; ie=1writeText='document.all.divZoom.innerHTML=\'<p align=\"\'+align+\'\" style=\"font-family:\'+font+\'; font-size:\'+fontsize+\'px; color:\'+color+\'">\'+text+\'</p>\''closeIt=""}if (document.layers) {n=1;ie=0writeText="document.divZoom.document.write('<p align=\"'+align+'\" style=\"font-family:'+font+'; font-size:'+fontsize+'px; color:'+color+'\">'+text+'</p>')"closeIt="document.divZoom.document.close()"}/*The functions for writing text.****************************************************************************/function writeIt(){if(text.length>0){text=text.slice(0,text.length-1)eval(writeText)eval(closeIt)setTimeout("writeIt()",Wspeed)}}/*This is the functions that calls the right function...or something :}****************************************************************************/function writeInit(){eval(writeText)eval(closeIt)if(ie || n) setTimeout("writeIt(0)",timetowait)       }//***************************************************************************</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<DIV id=divZoom style="LEFT: 10px; POSITION: relative;"></DIV><DIV id=footer+text style="LEFT: 10px; POSITION: relative;"><LAYER top="230" left="10" name="footer+text"></LAYER></div><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->