Created
January 23, 2017 19:02
-
-
Save paulfarino/d6a1532d79386951b3f24c4a9e44c8be to your computer and use it in GitHub Desktop.
Animated Page Transitions via class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('page:change', function() { | |
document.getElementById('primary-content').className += 'animated fadeIn'; | |
}); | |
document.addEventListener('page:fetch', function() { | |
document.getElementById('primary-content').className += 'animated fadeOut'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment