The WebToolBox
Pulsating Text

HOME

Slide-in Menu
Background Changing
DHTML Analog Clock
Static Menu Script
Scrolling Text Link
Textual Tooltip Script
Mouseover Link Bar
Bouncing Message
Shock Wave Text
Nudging Text
Roller Coaster Text
Text Animator
Typing Text Script
Pulsating Text
Cross Browser Marquee
Cursor Scroller
Cursor Trailer Text
Dropdown Menu
Text Area
Disco Background Effect
Scientific Calculator
Basic HTML Tutorials
Guide to Javascripts
Color Chart
Hex Color Codes
Contact Information

To copy,highlight codes below and press Ctrl+C,to paste click left then right in your html text area.Edit.(Note:Poorly formatted codes can produce unexpected results.)

The WebtoolBox!!

Pulsating Text

<html>

<body>

<span id="theText" style="width:100%">
<h2>The WebtoolBox!!</h2>
</span>

<script>
<!--

/*
Pulsating Text (Chris A e-mail: KilerCris@Mail.com)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/


//range of glowing
var from = 5;
var to = 11;

//speed of pulsing
var delay = 55;

//color of glow, name or RGB value (example:'#00FF00')
var glowColor = "lime";


//NO MORE EDITING!!!
var i = to;
var j = 0;

//can be called here or whenever you want the text to start pulsing
textPulseDown();

function textPulseUp()
{
if (!document.all)
return
if (i < to)
{
theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i++;
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}

if (i = to)
{
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}


}

function textPulseDown()
{
if (!document.all)
return
if (i > from)
{
theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i--;
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}

if (i = from)
{
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}


}

//-->
</script>

</body>

</html>