Skip to main content
Known Participant
November 20, 2025
Question

JavaScript Smooth/Auto Scrolling

  • November 20, 2025
  • 0 replies
  • 22 views

Hey, y'all. I've used the JavaScript below (inspired by Paul Wilson!), which has worked well to automatically scroll my long scroll projects. It works as designed in both Preview and within our company's LMS. However, it doesn't work in Share for Review. Anyone else experience this? Any workarounds?

 

Currently using Captivate 12.5.


const contentBlocks = document.getElementsByClassName("cp-cb__container");

 

// Check if the second element exists before trying to scroll.

if (contentBlocks.length > 1) {

contentBlocks[1].scrollIntoView({

behavior: "smooth"

});

};