- Log in your Blogger account.
- From the Dashboard, go to Layout
- Choose Edit HTML
- Scroll down a bit or look for :
</head> - Immediately above that, copy/paste :
<script language="javascript" type="text/javascript"> function toggleVis( elemID ) { var elem = document.getElementById( elemID ); if( elem.style.display != 'none' ) { elem.style.display = 'none'; } else { elem.style.display = 'block'; } } </script> - Save your template.
- To use it, you just have to create a DIV and give it an ID. And then, create an instance which (e.g. on click) will invoke the 'toggle visibility' function of your DIV.
- Example :
<a onclick="toggleVis('example');">
Click here to toggle visibility of the following element</a> <div id="example">This is the element to be toggled</div>
produces...
Click here to toggle visibility of the following element
This is the element to be toggled
Showing posts with label Toggle Visibility. Show all posts
Showing posts with label Toggle Visibility. Show all posts