Chris - that's definitely something you can handle with CSS and a touch
of javascript. My preference for this type of behavior is to have the
text visible in it's CSS definition, then hide it with javascript. That
way if the visitor doesn't have javascript (and thus the mechanism to
make the text displayable) enabled, they're not going to miss out on
your content.
You can do this in a few lines of javascript[1], but be aware that
different browsers have slightly different ways of adjusting the
visibility of page elements.
If you're not afraid of taking on a bit of page-weight (about 55k),
prototype[2]/script.aculo.us[3] have some nice methods for
show/hide/toggle[4] text:
Element.show('ID');
Element.hide('ID');
Element.toggle('ID');
1. http://www.google.com/search?q=javascript+toggle+visibility
2. http://wiki.script.aculo.us/scriptaculous/show/Prototype
3. http://script.aculo.us/
4. http://wiki.script.aculo.us/scriptaculous/show/Element.hide
http://wiki.script.aculo.us/scriptaculous/show/Element.show
http://wiki.script.aculo.us/scriptaculous/show/Element.toggle
--
s:r {
scott reston
http://scott.therestons.com
scott at therestons * com
}
Chris C wrote:
Ok, here is my problem/scenario:
I have a ton of static information... (about 30 pages worth) on a
webpage
[code]
pbla bla bha/p
pblah blah blah/p
...
...
pblah blah page 15/p
...
pblah blah blah page 30/p
[/code]
What I (think I) want to do is tag only a selected few paragraphs etc..
[code]
div class=abrv
p blah blah blah page 15/p
/div
[code]
Then I need to have the ability to hide all the content except what was
tagged (class=abrv).
Essentially I want to have 1 document, but have the ability to show an
abbreviated version of it at the push of a button and then also be able
to flip back to the full unabbreviated version.
The current system is working with 2 separate files... but I'm sure with
the power of styles, this could be simplified into 1 document.
Am I even on the right track? Could point me in a good direction or give
an example of how I'd go about doing this?
Chris
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/