I my case the animation delay has no effect. I set it to 5000ms for testing and use in-page links. The animation starts right away though.
I my case the animation delay has no effect. I set it to 5000ms for testing and use in-page links. The animation starts right away though.
Comments
Comment #2
ewout goosmannThe delay only works on page load and therefore the animation will start immediately when clicking an in-page link. I think that is desirable in most situations.
Maybe it should be added as an checkbox option which says "Enable animation pause on in-page links".
What do you think?
Comment #3
demonde commentedYes, this would be very heplful.
In my case the delay is needed because without delay the scroll effect interferes with another animation (closing accordion item). But a delay might not necessarily help if the delay is coming after the target has been set.
Comment #5
ewout goosmannHi demonde,
I have added the feature to the dev branch of the module. If you go to the settings page of the module, you will see three options under "Enabled functionalities". The last option is "Enable animation delay on in-page links".
If you enable this option, the delay from the default settings will be used as timeout when clicked on an anchor link.
You can also override this delay per element by setting the data attribute "data-scroll-delay" on the element (not on the link itself).
Let me know if this feature is what you needed.
Comment #6
ewout goosmannComment #7
demonde commentedThis works for me. Great, thanks.
Though the inside page links seem to work slightly different to the absolute links.
I am using the delay to let animated scroll to find the scroll destination after another javascript action.
If I use an absolute link like mysite.com/thispage/#anchor on the page mysite.com/thispage the delay prevents to find the scroll destination before other javascript toggle actions but will do so after.
If I use the link #anchor on mysite.com/thispage the scroll destination will be found before the delay.
This means other action like opening an closing of accordion items will happen after the scroll destination is determined and sending the user to the wrong scroll destination.
Comment #8
ewout goosmannI don't think you can use the delay of this module the find the destination after another javascript action, because all delays are calculated form the beginning. That means that if the document is ready, is the script in this module will search for all "scroll to" elements and will calculate the delay for each element.
Comment #9
ewout goosmann