Dual Timers Fade In Text

[Total: 0    Average: 0/5]

This will fade into view two separate objects.

Head Code:

<style>
#divtofade1 { color: #FF5060; font-weight: bold; width: 250 ! important;}
#divtofade2 { color: #4060D0; border-color: #A03040 ; border-width: 3px ; border-style : solid;}
.fader { filter:alpha(opacity=0); width: 1; }
</style>
<script>
var Timers=new Array();
function init_example()
{
  Timers[1]=setInterval("doFadeIn(1)",50);
  Timers[2]=setInterval("doFadeIn(2)",500);
}
function doFadeIn(_v)
{
  if (eval("divtofade"+_v+".filters.alpha.opacity") < 100)
    eval("divtofade"+_v+".filters.alpha.opacity=divtofade"+_v+".filters.alpha.opacity+4");
}
</script>

Body Code:

This works only in IE.<BR>
<div id="divtofade1" class=fader>this is the text that is inside div number one</div>
<div id="divtofade2" class=fader>This is text two</div>
<a href="javascript:init_example();">click here to start the example</a>

Times Viewed: 3

Leave a Reply

Your email address will not be published. Required fields are marked *