Question about hiding information on website

S

StingerBB

I have a listing of description items on my site that have additional
information associated with them. I am trying to figure out how to set up
the page so that whenever someone clicks on a description item, the
additional information will appear next to it. For example, suppose that
there is an item called "Weather." When the user clicks on "Weather" they
should see a sentence right next to it that says, "Overcast with a chance of
rain." When they are done looking at the item, they should click on
"Weather" again and it should disappar. Does anyone know how to do this?

Also, I don't want more than one item to display the additional information
at a time. For example, if someone is looking at the "weather" item
described above, they wouldn't be able to look at any other items until they
close the information in this item.

Any help is appreciated. Thanks!
 
M

Murray

The tricky part of this is your requirement here -
they should click on
"Weather" again and it should disappar

Otherwise, it is pretty simple.

Put your additional information into 'layers' (absolutely positioned div
tags), position them as desired, and hide them. Then apply a show/hide
behavior to the description items to show their associated layer on mouse
over, and to hide it on mouse out.

As the visitor rolls over each description item, the associated information
will appear and then disappear.

In order to make the information appear on click, and then disappear on
click, you would need to use custom javascript to toggle the visibility of
the layer. I don't have a good script for you at the moment, but could find
one if you need it.

Finally, if you are going to use layers, I encourage you to read this -

http://www.thepattysite.com/layer_laws.cfm

(it's written for the Dreamweaver user, but the principles still apply. I'm
preparing one more from a FP perspective, but have not completed it yet)
 
A

Andrew Murray

try collapsible bullet lists (look up FP Help). Works in IE, but I don't know
about other browsers.
 
Top