Swup is a easy to use and flexible page transition library.You can define as many containers to replace, so you can work with the rest for your animation.
You can also use swup events to run your JavaScript, trigger analytics, close sidebars or anything you need.