Forum Discussion
YasinDamga
6 months agoCommunity Member
Relock Slides after wrong answer
Hi,
I use restricted navigation on my slides. At the end of each scene there is a question and when the wrong answer is given it sends you back to the first slide of the scene. Thing is after that...
Nedim
6 months agoCommunity Member
You can try this JavaScript code, as demonstrated in the attached video. Assuming the slide title name is "Question 1", the title name can be anything you like but needs to be reflected in the code. I've run the code when the timeline starts on this slide just for testing purposes. Further adjustments can be made depending on the specific scenario.
const q1 = document.querySelector('[data-slide-title="Question 1"]');
if ( q1 ) {
q1.classList.remove('cs-viewed');
q1.setAttribute('disabled', 'true');
q1.style.setProperty('pointer-events', 'none', 'important');
}