Skip to content

Transition of both pages (leaving & coming page) at the same time #443

Answered by daun
TanimMahbub asked this question in Help
Discussion options

You must be logged in to vote

As this has been answered in the corresponding issue, I'll quote it here for future visitor:

Swup currently doesn't provide an official way of running both the in and out animations in parallel. The current and the next page's content are never in the DOM at the same time.

You can implement this yourself by hooking into swup's lifecycle events and managing the containers yourself: clone the current container after the transitionStart event and then remove it after the transitionEnd event. This will need special care regarding scroll position, absolute positioning, etc.

Feel free to post your solution here for others.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by daun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants