问题
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.
来源:https://stackoverflow.com/questions/29374656/how-can-i-fully-disable-fullpage-js-under-certain-conditions