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

Arrow Menu



This script uses an image rollover effect to display a flashing arrow beside a link whenever the mouse is over it.


Paste the code below in the head of your page:
Now each link of the menu in the body section should look like this:

The Required Graphics

Two images are used: on.gif and off.gif.

A 10 x 10 pixels flashing red arrow has been as the mouseover image for this example:
If you wish to use this graphic, right-click on it, select "Save Picture As ..." and call it on.gif.


Next, use any graphics program to create the "off" image.

It must be exactly the same size as the "on" graphic, and exactly the same colour as your page's background.

Save it as off.gif.


How It Works

This is a basic image rollover script, with 2 differences:
  • the same 2 images are used for each menu item.
  • the default image is blank.
  • The latter is simply a placeholder the same size as the mouseover image.

    For this to be truly invisible, it must be exactly the same colour as the page background.


    When the mouse is over a link, the image's name is passed to the function imgover.

    This replaces the default image with IMG01, the "on" graphic.


    When the mouse leaves the link, a second function, imgout, is called.

    The image's name is passed to that function, which restores the default image.


    For the rollovers to work correctly, it's essential that:
  • each link image has a unique name.
  • the names must be different from the two names used in the script section.
  • In this example, they are IMG03, IMG04 and IMG05.


    Try It Out

    All links below are working, and will open in a new window.

    Yahoo Home
    Google Search
    MIDI Explorer



    © 2001 CyberSchool