mateus_reis
08-24-2006, 05:31 PM
1) Script Title: Switch Content Script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
How can I put bold on selected item? I want to put bold only at "curobj" selected... I try this code below, but it fails to reset non-current itens to normal after clicking...:
if (ccollect.length>0){
curobj.style.fontWeight=(curobj.style.fontWeight!="bold")? "bold" : "normal";
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none";
if (showstateobj.length>0){ //if "showstate" span exists in header
if (collapseprevious=="no")
showstateobj[0].innerHTML=(document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbol
else
revivestatus()
}
}
}
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
How can I put bold on selected item? I want to put bold only at "curobj" selected... I try this code below, but it fails to reset non-current itens to normal after clicking...:
if (ccollect.length>0){
curobj.style.fontWeight=(curobj.style.fontWeight!="bold")? "bold" : "normal";
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none";
if (showstateobj.length>0){ //if "showstate" span exists in header
if (collapseprevious=="no")
showstateobj[0].innerHTML=(document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbol
else
revivestatus()
}
}
}