Showing and Hiding Layers

Over 2000+ free Javascript
at Website

Sampled by Intro  |  Positioning  |  Link Style


You can save or view this document's source code using your browser menu commands.

The code is very simple. Position the layers absolute, giving them all the same left, top and width settings. An onload handler can show the first layer when the document loads.

A global variable keeps track of the currently visible layer so it can be hidden when a link is clicked to show another.