Setting Glossary Terms to open expanded

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
scrane
Jr. Propeller Head
Posts: 4
Joined: Wed Sep 23, 2015 12:13 pm

Setting Glossary Terms to open expanded

Post by scrane »

Hi all,

I've been trying to figure out a script to make glossary terms to open expanded.

I've tried modifying the scripts found in these two links, but I can't seem to get it to work specifically for glossary terms.

viewtopic.php?f=6&t=7652

viewtopic.php?t=7900

I've modified as such, but I'm sure I'm missing stuff as I have almost zero java script ability.

Added this to the body code:

Code: Select all

<body onLoad="openGlossaryTerms()">
Added this script to my topic:

Code: Select all

<script>
function openGlossaryTerms() {
//<![CDATA[
for (i=0;i<document.links.length;i++) {
if (document.links[i].className == 'MCglossaryTerm') document.links[i].click();
} } //]]>
</script>
However, the glossary terms stay closed unless I manually open them.

Thanks in advance!
Post Reply