Really need help with scripts #547
-
So I put swup. the animation works but the scipts don't work on the loaded page. I know people asked about it several times but I don't understand what's wrong with my code. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The swup container Regarding the scripts, have you tried the suggestions in the docs about Reloading Javascript? I'd strongly suggest doing that first. If you did that and are still having trouble, let us know. |
Beta Was this translation helpful? Give feedback.
-
Yes I did it. The I dunno.... maybe I should add some one time self refresh for each page? |
Beta Was this translation helpful? Give feedback.
-
I think you should read the linked docs page again. There's example code for your exact use case. You'll need to listen for swup's |
Beta Was this translation helpful? Give feedback.
I think you should read the linked docs page again. There's example code for your exact use case. You'll need to listen for swup's
contentReplaced
event and initialize any new components in the new content whenever that event fires.