barba.init({ transitions: [ {
name: 'general-transition-opacityfade',
once({next}){
animationEnter(next.container)
},
leave: ({current}) => animationLeave(current.container),
enter({next}){
animationEnter(next.container); }},
Re-run my JS script using Barba.JS Is there a way to add a script to the DOM and run on page enter?
You can specify what barba can do before enter after the transition that leads you to the new page.
For example, if you want to execute a script or a just a piece of code to the next transition you can use this.
you can find the 'namespace' tag in every single HTML doc that you create and want to link with barbajs hope this works for you.