free hosting   image hosting   hosting reseller   online album   e-shop   famous people 
Free Website Templates
Free Installer

Glowing Link


This script lets you create a link that glows on mouseover.


Paste this code in the head section of your page:
This section goes in the body:

How It Works

In the bottom section - the body code - the link is given the ID myLink.

In the top script, a few parameters for the link are preset in the STYLE tag.

The width parameter must be preserved in order for the filter to work.

Adjust the value to accommodate longer link text.


When the mouse passes over the link, the function glow() is called.

This uses a loop from 0 to 5 control a setInterval timer, with steps of 10 milliseconds.


In turn, this timer controls the function makeglow().

This applies a purple glow filter (FF00FF) to the link with the ID myLink:
myLink.style.filter="glow(color=#FF00FF,strength=" + i + ")"
The intensity of the filter depends on the value of the counter i.

Both colour and timer values may be modified as required.


When the timer reaches its final count, the interval is cleared.

The last glow intensity value is retained until the mouse leaves the link.


On mouseout, the function back() is called, which:
  • clears the interval timer - clearInterval(interval)
  • disables the glow filter - myLink.style.filter=false

  • Try It Out

    Clicking the link merely refreshes this page
    Place your mouse over this link



    © 2001 CyberSchool