Hidden Text Script needed
Hi Guys,
I want to make a web based flow chart where you click on a bit of text and it then displays further stuff which was previously hidden.
I'm sure i've seen it before, but am not sure if it was Javascript or not.
Any ideas?
Cheers
-Rob
pr0gr4mm3r posted this at 17:44 — 12th October 2007.
He has: 1,502 posts
Joined: Sep 2006
I've seen it done before with CSS and JavaScript.
To hide something, add the CSS property "visibility: hidden;". To show it, use this line of JavaScript:
javascript:document.getElementById('something').style.visibility='visible'
'webwiz posted this at 22:08 — 12th October 2007.
He has: 629 posts
Joined: May 2007
You can also do this with CSS. The classic article on this is Eric Meyer's Pure CSS Popups.
Having said that, JavaScript gives you a lot more options. Some nice variations demo'd at www.codylindley.com/blogstuff/js/jquery/ using jQuery.
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
robfenn posted this at 08:41 — 15th October 2007.
He has: 471 posts
Joined: Jun 2005
Brilliant guys, thanks!
robfenn posted this at 10:35 — 15th October 2007.
He has: 471 posts
Joined: Jun 2005
Managed to get something working now, one problem i had was finding a solution so multiple divs could be chosen. Feel free to use it.
http://www.sixthsense-esp.co.uk/sanchi/test.htm
Rohan posted this at 18:55 — 6th November 2007.
They have: 2 posts
Joined: Oct 2007
Instead of visibilty:hidden, you could also use display:none.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.