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

Show Div

Created by mpecher. Last edited by mpecher, 5 years and 176 days ago. Viewed 3,791 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


< February 2012 >
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
26272829


Logged in Users: (0)
… and 9 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.