Skip to main content
teriw38899602
Participant
October 12, 2018
Answered

Captivate 9: Turning off TOC When Quiz Starts (HTML5 output)

  • October 12, 2018
  • 2 replies
  • 321 views

I am trying to hide the TOC when the quiz starts; however, nothing seems to work. I've tried the simple "Hide TOC" on enter, assign TOC variable and hide TOC in an advanced action, etc. But, nothing turns it off. I can turn it off at the beginning, but then it won't display when it needs to. My output is HTML5. Any ideas? Thanks.

    This topic has been closed for replies.
    Correct answer TLCMediaDesign

    Is your TOC in Overlay or separate?

    Even if you can hide it (only in overlay mode) you would also need to hide the TOC Expand button,  else they could just open it back up.

    You could also execute this JavaScript onEnter:

    document.getElementById("toc").style.visibility="hidden";

    and the to turn it back on:

    document.getElementById("toc").style.visibility="visible";

    2 replies

    Lilybiri
    Legend
    October 12, 2018

    That command only works for a TOC in overlay, not for one in separate mode.

    You can replace the expand/collapse icons by a toggle button. For that reason I use to replace the icons by a custom empty image. To create a toggle button have, a look at this blog post:

    1 action = 5 Toggle Buttons - Captivate blog

    Of course, if you prefer JS it is up to you.

    TLCMediaDesign
    TLCMediaDesignCorrect answer
    Inspiring
    October 12, 2018

    Is your TOC in Overlay or separate?

    Even if you can hide it (only in overlay mode) you would also need to hide the TOC Expand button,  else they could just open it back up.

    You could also execute this JavaScript onEnter:

    document.getElementById("toc").style.visibility="hidden";

    and the to turn it back on:

    document.getElementById("toc").style.visibility="visible";