The process is exactly the same actually, except instead of updating the toggler's ".src" property, you'd update its ".innerHTML" property instead. For example:
Code:
animatedcollapse.ontoggle=function($, divobj, state){
if (document.getElementById(divobj.id+"-toggler"))
document.getElementById(divobj.id+"-toggler").innerHTML=(state=="block")? "Collapse" : "Expand"
}
HTML:
Code:
<a id="jason-toggler" href="javascript:animatedcollapse.toggle('jason')">Toggle</a>
<div id="jason" style="width: 300px; background: #FFFFCC; display:none">
<b>Content inside DIV!</b><br />
<b>Note: Fade effect enabled. Height programmically defined. DIV hidden using inline CSS.</b><br />
</div>
Bookmarks