Java script to hide TOC

Problem:
Is there a Java Script which allow to hide a slide in the TOC? I like to hide a slide by click on a button in the online training. Should have the same funktion as to do it in the TOC settings.

Zwischenablage02

ActivePresenter version:
9
OS:
Win 10
Notes:

Hi Oliver,

Please try the following code:

var indexToHide = 3; //replace 3 by your item index, starts from 0
$('.ap-toc-entry').eq(indexToHide).hide();

Regards,

1 Like

Dear Dao,

I´m very impressed :flushed:Yupp this is working, the slide is not longer visible in the TOC. Unfortunatly it is still active as slide, may is there an option to hide it also in the training/presentation/course ?

Aaand ( yes one question more ) is it possible to hide more than one, maybe slide 3 to 12?

Only for completion: Is it also possble to show a hidden slide in TOC? May I put your code in the loading settings of the project, so that the slide is hidden from the beginning, a click on a button show it later?

Thaaaaaanks so much
Greetings Oliver

Hi Oliver,

  1. It is not possible to hide the slide in the course because it is still visible in the progress bar. However, you can prevent viewers from visiting that slide by using Variables & Condition in its On Load action (see sample below):
    HideSlide2.approj (324 KB)

  2. For hiding more than one, you can use the code below:

$('.ap-toc-entry').filter(function( index ) { return index >= 3 && index <= 12}).hide();

  1. Yes, it is possible.

Regards,

1 Like

Dear Dao,

perfect. Sorry for the additional questions, but they came up while working on the projects.
Your solutions are working great.

  1. :rofl: I like your straight way.

All the best for you

1 Like