'checkbox_examples' set: show 1


show 2


show 3


show 4


show 5


This simple javascript code shows and hides any element that can have an id attribute.

It is known to work in:

MSIE 5+
Firefox 0.8
Netscape 6

It is known not to work in:

Opera 6.03
Netscape 4.75

Search Engines are able to read the hidden content.


Notice what happens when you do the following:
click show 3a
click show 1
click show 4a

See how the script knows that it should hide span3a, not span1?
This is achieved by using a different 'set_id' for the two examples.
Think of the set_id in the same way as the name attribute of radio and check boxes in HTML.
'radio_examples' set: show 1a


show 2a


show 3a


show 4a


show 5a