Page Transition Click Delay
Add a delay when a user clicks on a link on your Webflow site. This functionality adds a nice delay to your Webflow site before the users hit the next page.
Add a delay when a user clicks on a link on your Webflow site. This functionality adds a nice delay to your Webflow site before the users hit the next page.
How to add it
- Add the Javascript code to your closing body tag of your page settings
The code
Javascript
<!-- Add to your bodys closing section -->
<!-- Page Transition Out Delay -->
<script>
$('a.class, a.class2').click(function (e) {
e.preventDefault(); // prevent default anchor behavior
var goTo = this.getAttribute("href"); // store anchor href
setTimeout(function(){
window.location = goTo;
},500); // time before completing action
});
</script>