Try adding the below script to your page:
Code:
<script type="text/javascript">
function closeheader(switchinstance, header){
var header=document.getElementById(header)
switchinstance.contractcontent(header)
}
</script>
It lets you contract a header from anywhere on the page, such as inside the content itself. As an example:
Code:
<h3 id="bobcontent1-title" class="handcursor">What is JavaScript?</h3>
<div id="bobcontent1" class="switchgroup1">
JavaScript is a scripting language originally developed by Netscape to add interactivity
and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
<a href="javascript:closeheader(bobexample, 'bobcontent1-title')">Close</a>
</div>
Where bobexample should be the variable name of this Switch Content instance, and 'bobcontent1-title' the ID of the header which you wish to collapse.
Bookmarks