[ start | index | login ]
start > Development > Javascript > Hide > Show Div

Show Div

Created by mpecher. Last edited by mpecher, 3 years and 214 days ago. Viewed 3,675 times. #1
[edit] [rdf]
labels
attachments

To hide/show a <div>

<a name="h1name"></a><h1>Heading 1 Text</h1>
<span id="h1show"><a href="#h1name" 
onclick="h1.style.display='block';h1.style.border='3px solid #999999';
h1.style.margin='10px';h1hide.style.display='inline';
h1show.style.display='none'">
Show Code</a></span>
<span id="h1hide" style="display:none"><a href="#h1name" 
onclick="h1.style.display='none';
h1show.style.display='inline';h1hide.style.display='none'">
Hide Code</a></span>
<span id="h1" style="display:none"><pre><h1>Heading Text</h1></pre></span>
<hr />
no comments | post comment

Menu:
Java & J2EE
Development
Books

Help:
Help FAQ
Formatting


< March 2010 >
SunMonTueWedThuFriSat
123456
78910111213
14151617181920
21222324252627
28293031


Logged in Users: (1)
… and 254 Guests.



Disclaimer: Views and opinions are that of the individual author, and not that of Marand Custom Solutions. This site is an open forum for technical content, and the company accepts no liability for any content or view expressed.