How to make burning text in JavaScript

You can make different dynamic text effects on your html page using JavaScript function document.getElementsByTagName(‘tag_name’). The idea is to select tag, which is absent in your html (for example:<tt>, <i>, <b> etc.). Then you should embrace all letters of your text with this tag. For example: “Hello world” transforms to “<tt>H</tt><tt>e</tt><tt>l</tt><tt>l</tt><tt>o</tt><tt> </tt><tt>W</tt><tt>o</tt><tt>r</tt>

<tt>l</tt><tt>d</tt>”. After that you can dynamically change style (color, font etc.) of every letter you want accessing to it during array document.getElementsByTagName(‘tt’).

So, you can create with your text such effects like burning, dissapearing, growing etc. Please, look at to get sample scripts.

Friday, December 21st, 2007