-->

How can I fully disable FullPage.js under certain

2019-09-19 13:10发布

问题:

I'm currently using fullPage.js for an information panel. When the user clicks the info button, a fullPage.js overlay appears on top of the rest of the page. The issue I'm having now is that I don't want the fullPage.js functionality to be applied to the rest of page when the info button isn't active.

Is there a way to fully disable all fullPage.js functionality?

Thanks!

回答1:

You can destroy it completely by using the destroy function:

//destroy any plugin event (scrolls, hashchange in the URL...)
$.fn.fullpage.destroy();

//destroy any plugin event and any plugin modification done over your original HTML markup.
$.fn.fullpage.destroy('all');

Just add that function inside your click event for that button, for example.