-
-
Save dustinsmith1024/5989030 to your computer and use it in GitHub Desktop.
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).on("page:change", function(){ | |
window.prevPageYOffset = window.pageYOffset; | |
window.prevPageXOffset = window.pageXOffset; | |
}); | |
//fix-scroll want needed for me | |
$(document).on("page:load", function(){ | |
window.scrollTo(window.prevPageXOffset, window.prevPageYOffset); | |
}); |
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).on "page:change", -> | |
window.prevPageYOffset = window.pageYOffset | |
window.prevPageXOffset = window.pageXOffset | |
$(document).on "page:load", -> | |
if $(".fix-scroll").length > 0 | |
$('.fix-scroll').hide().show() # force re-render -- having an issue with that on Chrome/OSX | |
window.scrollTo window.prevPageXOffset, window.prevPageYOffset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment