Replies: 2 comments
-
You can dynamically set the containers to be replaced on each visit. Untested example below. This will replace the container, but appending content should be doable by nesting the elements appropriately. swup.hooks.on('visit:start', (visit) => {
if (visit.to.url === '/about') {
visit.containers = ['#target']
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
-
For more complex setups and built-in animation support, check out the Fragment Plugin which allows defining dynamic containers conditionally by url or callback. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to get a partial element of body on click link or fetch?
When I click on a link on a page that goes to a different page, I want it to append an element I specify inside an element I specify on the main page, instead of changing that page completely.
Example:
Beta Was this translation helpful? Give feedback.
All reactions