Skip to content

Instantly share code, notes, and snippets.

@seajones
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save seajones/11252561 to your computer and use it in GitHub Desktop.

Select an option

Save seajones/11252561 to your computer and use it in GitHub Desktop.
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;}
}
@seajones
Copy link
Copy Markdown
Author

Worth noting: This doesn't work with mobile devices but it will when I next update it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment