Show Hide DIV Content - Show / Hide your content by using a text or graphic image link to show or hide the DIV contents.
Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser
Example: View Code Demo
<html> <head> <title>Show Hide DIV Content Javascript Code Snippet</title> </head> <body> <script> <!-- Begin Show Hide Content from http://snapbuilder.com Free Public Codes Library // Free to use as long as the credit lines remain in place function HideContent(d) { document.getElementById(d).style.display = "none"; } function ShowContent(d) { document.getElementById(d).style.display = "block"; } function ReverseDisplay(d) { if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; } else { document.getElementById(d).style.display = "none"; } } //--> </script> Click The Link For Demo >>> <a href="javascript:ShowContent('uniquename')">Show The Content</a> <div id="uniquename" style="display:none;"><p>This is a Show Hide DIV Content Javascript Code Snippet that will help you show/hide your content inside a DIV box!</p> <a href="javascript:HideContent('uniquename')">Hide The Content Above</a> </div> <br /><br /> <div id="snippet"> [ This code example from <a href="http://snapbuilder.com/code_snippets/copy_code_snippet_23.html">Show Hide DIV Content</a> page. ] </div> </body> </html>