Return to Snippet

Revision: 5434
at March 9, 2008 01:18 by gbot


Initial Code
<a href='javascript: toggle()'>toggle</a> <div id='div1' style='display:none'> Don't display me </div> <script> 

function toggle(){ var div1 = document.getElementById('div1') if (div1.style.display == 'none') { div1.style.display = 'block' } else { div1.style.display = 'none' } } </script>

Initial URL
http://www.roscripts.com/snippets/show/144

Initial Description

                                

Initial Title
Javascript toggle content - roScripts

Initial Tags

                                

Initial Language
JavaScript