Code:
<script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex17/switchcontent.js" ></script>
<style type="text/css">
.handcursorsub
{
cursor:pointer;
color: #E8E8E8 !important;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
}
.handcursorsubhover
{
cursor:pointer;
color: #92C7F2 !important;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
}
</style>
</head>
<body>
<span id="1-title" class="handcursorsub" onmouseover="this.className='handcursorsubhover'"
onmouseout="this.className='handcursorsub'" onClick="Toggle(this)">foo foo has a question</span>
<div id="1" class="faq"><h5>
bar bar has a answer
</h5></div>
<script type="text/javascript">
// MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
// Call Instance.init() at the very end. REQUIRED
var faq=new switchcontent("faq", "div") //Limit scanning of switch contents to just "div" elements
faq.setStatus('', '')
faq.setColor('white', 'white')
faq.setPersist(false)
faq.collapsePrevious(true) //Only one content open at any given time
faq.defaultExpanded()
faq.init()
</script>
Bookmarks