Subscribe to Collegiate Chronicles        RSS Feed
-----

Collapsing Sections

Icon Leave Comment
This technique uses HTML and Javascript.

The code:

Javascript (in your header or an external file):
<script type="text/javascript">
function toggleDiv(divid){
	if(document.getElementById(divid).style.display == 'none'){
	  document.getElementById(divid).style.display = 'block';
	}else{
	  document.getElementById(divid).style.display = 'none';
	}
  }
</script>



HTML:
<a href="java script:;" onmousedown="toggleDiv('mydiv');">Click here for more info!</a><br />
<div id="mydiv" style="display:none">
Here's the hidden text!
</div>



See it in action here!

0 Comments On This Entry

 

November 2019

S M T W T F S
     12
3456789
10111213141516
17181920 21 2223
24252627282930

Recent Entries

Recent Comments

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)