Last active
August 29, 2015 14:00
-
-
Save seajones/11252561 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
| function removeFullPageJS() { | |
| /* Remove Fullpage.js by Alvaro Trigo | |
| * | |
| * Fullpage.js is a script by Alvaro Trigo, that you can find here https://github.com/alvarotrigo/fullPage.js/tree/master | |
| * The script allows you to take over the scrolling of a website and make it scroll in one page sections | |
| * | |
| * On occasion, say if the user resizes their browser to a small width, you may need to remove it's functionality | |
| * | |
| * This Gist removes the main effects of Fullpage.js. Both the Gist and Fullpage itself rely on jQuery. | |
| */ | |
| // Allow body to scroll again | |
| $('body').css({ | |
| 'overflow' : 'auto' | |
| }); | |
| // Copy the contents of the super container, remove it, and append contents to body | |
| var superContainer = $('#superContainer'), | |
| contents = superContainer.html(); | |
| superContainer.remove(); | |
| $('body').append(contents); | |
| // Unbind Window scroll events | |
| $window.off('scroll'); | |
| $.fn.fullpage = function (args) {return;} | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Worth noting: This doesn't work with mobile devices but it will when I next update it