I want to make an auto-scroll down on my WordPress website which was built with elementor. In this video, you see that the auto-scroll code worked every page but I don't want that. I want that for each page(Screenshot). The scroll will be stopping in the red mark section. How can I do it?
The auto-scroll will be working just for this page.
Here have a video link: https://drive.google.com/file/d/1yKPEtvGa82UB2kqSYXvXHg1M4r7B4Ecv/view?usp=sharing
The jQuery code:
The auto-scroll will be working just for this page. and will stop the red mark section.
instead of having a hardcoded scrolltop value, u should make this dynamic by giving the "red marked box" an identifier i.E id="stop_here" and in your code u will use the offset relative to the document, e.g:
.animate({scrollTop: $('#stop_here').offset().top, ...