Skip to main content
Known Participant
Nov 7, 2019 12:52 PM UTC
Question

Hiding slides

Is there any way to hide and show slides via javascript? Thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

15 replies

Stagprime2687219
Legend
Nov 8, 2019 1:05 PM UTC

I was not successful with the things I tried last night.

I wanted to try playing with visibility parameters once the SlideID was obtained.

 

Translate
Known Participant
Nov 8, 2019 4:39 PM UTC

Thanks for trying

Translate
chrismay_at_delta17095116
Inspiring
Nov 7, 2019 8:05 PM UTC

Sorry if post twice - really NOT liking the new forum site :(.

 

I have done something similar.  It is not really hiding/showing but skipping or braching.

 

Once the lesson loads, I have some JS that parses through all the slides (you can access all kinds of data about the slides using cp.model.data) and I make my own list/array of slides that the viewer should be seeing. JS also sets the next and back button on each slide so they point to the correct next/previous slides.

 

It should not be hard to extend that logic on to a draggable progress bar.

Translate
Known Participant
Nov 7, 2019 8:31 PM UTC

thanks

Translate
Lilybiri
Legend
Nov 7, 2019 5:06 PM UTC

Totally agree with StagPrime. A hidden slide in Captivate is not included in the output, same as if it didn't exist. Contrary to objects on slides which can be shown and hidden because they will be included in the output folder.

You can easily skip a slide with an advanced conditional action, or with JS if you prefer coding. If you explain exactly why and in which situations you want to skip slides or to use branching, could offer more details.

Translate
Known Participant
Nov 7, 2019 5:41 PM UTC

The problem is that all slides are in the navigation path with a dragable playhead. I can easily correct the problem by not using a progress bar, but then the learner would have to replay an entire audio clip even when they want to rewind, or go back, just a second or two.

Translate
Stagprime2687219
Legend
Nov 7, 2019 2:36 PM UTC

An interesting question.

I admit I am trying to consider the use case.

I have never tried to hide a given slide

If I create a slide - it is created with purpose and I do not hide it.

That being said - I do create branching and/or other nonlinear projects where a learner may never end up visiting a particular slide.

That is all handled by navigational logic through learner choices versus the showing and hiding of a slide altogether.

 

If you just want the slide hidden, you can just right click the slide in the filmstrip panel and select hide slide.

Otherwise, if it were me - I would simply navigate around it.

Unless someone else has a quick answer to this - I will experiment with a couple thoughts I have to see if I am able to do this after I get home from work this evening.

Translate
Known Participant
Nov 7, 2019 2:58 PM UTC

I can think of several reasons to hide a slide. Ultimately, the reason is to exempt the slide from the navigation path that the learner will access by dragging the progress bar slider. In my opinion, the slider and progress bar should be for a single slide, especially when you consider that the learner can easily navigate to other slides via the TOC. 

 

I want to use a draggable progress bar slider, but still prevent the learner from accessing certains slides. 

 

Translate
Stagprime2687219
Legend
Nov 7, 2019 3:08 PM UTC

If the slides will remain hidden throughout - will it work for you to simply hide them in your design mode

with the right click >> hide slide?

 

Unless there is some need to dynamically hide/unhide a slide during the finished product - that would seem the easiest way.

I never use the native controls so have not encountered this need.

Translate