hey guys.
is anyone aware of a way to add a delay to the built in anchor scrolling animation in webflow? i know that there is a custom attribute called “data-scroll-time” you can add to the body of your site. but i would like to to fire an interaction first and then scroll to the desired section.
thank you @Hamilton but i don’t think you understood me correctly. i dont want to delay the interaction. i want to delay the default anchor scrolling animation.
hey @vincent!
last time i just needed the second solution because link and section were on the same page. for a different project i am trying to use your first solution now. the section is not on the same page as the link. but i dont really get it working.
i already wrote a custom piece of code to delay pageloads for every link with the class .pagetransition. like this i can trigger an interaction before the user will be guided to the new page. i will attach the code to the bottom of this post.
now i need a button to follow the same timeout function but also scroll to a section anchor on the next page. before the scrolling animation i want the site to timeout again so that i can fire another interaction first. so the idea is: click → wait 400ms → pagetransition → wait 400ms → scroll to section anchor.
maybe you can help me out again. i would really appriciate this.
I have a very limited understanding of Javascript. Usually I was reaching to @sabanna or @bart for help but as they work for Webflow now, they can’t focus on custom code requests anymore. You need to find yourself a Javascript buddy and that buddy can’t be me, very very sorry