Previous Message
Next Message

Best Way to Show/Hide Text

Sent by Christian Heilmann on 14 March 2006 17:05

> I'm wondering if there is a definitive way to show/hide text using
> JavaScript and CSS. I'm working on a project which involves a map
> with various states that are linked. When a state is clicked content
> appears which is relevant to that state. Click another state, the old
> content is hidden and the new content appears.

This is off-topic for the CSS list. However, the best option in this
case is the following:

- make the site work without JavaScript
- don't make the CSS dependent on the JavaScript, without the JS the
page should still work, now it is a bunch of elements covering each
- Use JavaScript to apply a dynamic class to a parent element and hide
the nested elements with that one in your CSS.

I'll create a quick demo :-)
Chris Heilmann
css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: