Show/Hide a DIV
General
Showing and hiding a DIV using a link can be very useful when it's not necessary to always display information on the Web page. For example, this technique can be used for posting comments on a blog. That way you don't need to use a popup window or a separate page.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent porttitor luctus quam. Pellentesque diam libero, feugiat quis, porttitor sagittis, suscipit dignissim, pede. Duis dapibus mauris at enim. Morbi vehicula turpis nec massa.
Notes
- Created by: Justin Barlow
- Web Site: http://www.netlobo.com
- Posted: February 29, 2008
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: showHideDiv.js
CSS
Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.
Head
Paste this code into the HEAD section of your HTML document.
Body
Paste this code into the BODY section of your HTML document


Leave a Response
(3 comments)Thanks. It's working now.
Is it possible to make the default toggle position = "Hidden".[br /]When page is opened the text box etc is visible and I feel should not be[br /]Thanks
I had to copy the source code, and paste it into my own sheets. The link is broken to e-mail it to myself.