To change pages once your GSAP animation ends, you can use window.location
to set your browser page dynamically using JavaScript. This gets the job done and is great if you need something quick and easy, but the only issue is, when changing pages using window.location
, all of your CSS and JavaScript assets are reloaded in their entirety. It would be much more efficient to only load new content that is appearing, rather than all of the CSS and JS we loaded previously.
The rest of this series will show you how to do exactly that, creating a seamless transition into a work page using the single page app framework: Nuxt.js.