I’ve implemented this script https://codyhouse.co/gem/animated-page-transition/ to WordPress which allows me to load some of my pages dynamically.
The loading of new pages works fine. The only thing I can’t figure out is how to adjust window.history in the way that it works inside WP. If I click back button in my browser the page returns correct slug but the loaded content is empty.
var newSection = 'cd-'+url.replace('', '')
var newSectionName = 'cd-'+url.replace('.html', '')
as given in demo. Any idea how to implement it correctly inside WordPress?
Read more here: Manipulating browser history with WordPress