I found a good way of doing what I want to do. Here is the code.
HTML Code:
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min
.js"></script>
<script type="text/javascript">
function toggleDiv(divId) {
$("#"+divId).toggle();
}
</script>
<a href="javascript:toggleDiv('myContent');" style="background-
color: #ccc; padding: 5px 10px;">Toggle Button</a>
<div id="myContent" style="background-color: #aaa; padding: 5px
10px;">
The content in this div will hide and show (toggle) when the
toggle is pressed.
</div>
Bookmarks