To also make toggler links that carry a certain CSS class name (ie: "someclass") bold when expanded, you would extend the code above with the part in red below:
Code:
animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
if ($('#'+divobj.id+"-toggle").length==1){ //if toggler link exists
$('#'+divobj.id+"-toggle").css('color', (state=='block')? 'green' : 'gray')
if ($('#'+divobj.id+"-toggle").hasClass('someclass'))
$('#'+divobj.id+"-toggle").css('fontWeight', (state=='block')? 'bold' : 'normal')
}
}
Bookmarks