Skip to content

How to update the w--current class in Webflow after the page loads using Swup? #568

Answered by daun
ViniciusMoreira33 asked this question in Help
Discussion options

You must be logged in to vote

You can use the morph plugin for that type of thing. It will carry over any changed classnames and attributes. Assuming your content is in #content and you nav is in #nav:

const swup = new Swup({
  containers: ['#content']
  plugins: [
    new SwupMorphPlugin({ containers: ['#nav'] })
  ]
})

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ViniciusMoreira33
Comment options

@daun
Comment options

daun Jan 3, 2023
Maintainer

@ViniciusMoreira33
Comment options

@daun
Comment options

daun Jan 4, 2023
Maintainer

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