Barba JS / Ajax page transitions with Sage 9

First of all, thanks very much for Sage. It’s pretty damn cool so far, I really appreciate the hard work Roots has put into it.

I’m curious as whether or not anyone can tell me how they went about implementing page transitions with Barba.js while working with Sage 9. Cheers.

http://barbajs.org/installation.html seems straightforward?

@vanillagorilla see details in this post for the JS part (the HTML part is is pretty straightforward if you add the wrapping classes).

It works well but now the headache I have is with plugins that add their own CSS to the head (hello Elementor!) or worse, plugins (ie. Revolution Slider) that add blocks of javascript inside <script> tags - it doesn’t get executed when loaded via AJAX…

I like the way Barba.js works but I’m beginning to wonder if the complexity it adds to a WordPress setup is worth it!