somerfeld
07-20-2011, 02:55 AM
1) Script Title: Switch Content I
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
Trying to find a way for hover to work,. but no matter what i do i cannot get it to function i have tried this and many other variations.. can you help me ? I'm im not having a stupid moment :eek:
<script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex17/switchcontent.js" ></script>
<style type="text/css">
.handcursorsub
{
cursor:hand;
cursor:pointer;
color: #E8E8E8;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
text-decoration: none;
}
.handcursorsubhover
{
cursor:hand;
cursor:pointer;
color: #92C7F2;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
text-decoration: none;
}
</style>
</head>
<body>
<span id="1-title" onmouseover="this.className='handcursorsubover'"
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>
but with no success
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
Trying to find a way for hover to work,. but no matter what i do i cannot get it to function i have tried this and many other variations.. can you help me ? I'm im not having a stupid moment :eek:
<script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex17/switchcontent.js" ></script>
<style type="text/css">
.handcursorsub
{
cursor:hand;
cursor:pointer;
color: #E8E8E8;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
text-decoration: none;
}
.handcursorsubhover
{
cursor:hand;
cursor:pointer;
color: #92C7F2;
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
text-decoration: none;
}
</style>
</head>
<body>
<span id="1-title" onmouseover="this.className='handcursorsubover'"
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>
but with no success