Hi, with some help from other users I am nearly there with this. I want to click a link but delay the page transition until an animation finished.
This code from @samliew is almost there, it delays the transition and goes to the page correctly but it also stops the animation from happening.
Here is my test link with the above code added to Custom code in the footer, as you will see the link delays for 3 seconds before taking the user to the next page, but it stops the animation changing the background colour of the body.
Hey John, can you show me this on your site? What was the final code? How did you implement on the button? Struggling here… thanks in advance for any help you can give
Check that you have the code in the footer and that your link div includes the class to call the code, in my case .pagetransition. When the link is clicked it pauses for the specified time before moving to the next page.
On my site (link below, for future readers link will probably not remain active), scroll down on home page and click one of the portfolio items, a div grows from the right hand side to fill the screen before taking the user to a new page with the same colour background so the movement ultimately will feel like the page has grown out of the click! I hope! Not finished yet.
Note that you cannot see custom code effects in the webflow preview mode, you need to publish the site and look at it in a browser.
Hi all! Thank you so much for all the helpful info here.
I’ve put the code in my footer, and I’ve given the button the .pagetransition class name. But I don’t think it’s working because I’m using a mailto: link.
As you can see, in the ‘WriteSection’ - I’ve got a little ‘loading bar’ which I’ve got the interactions/animation down-pat (I think) but once you click the ‘contact button’ - the animation doesn’t play and the mailto link doesn’t work. But the 3 second delay does work!
Tagging @samliew and @johnsherwin because you both seem to know a lot about this!
Let me know if you need any more information! I’m a bit of Webflow newbie.