-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On modal visible action #70
Comments
Hi @dimmuboy, unfortunately, there is no built-in option to do such a thing. You can however use a (function(){
const html = document.documentElement;
let isVisible = false, shouldShow = false;
const observer = new MutationObserver(function() {
shouldShow = html.className.indexOf('show--settings') > -1;
if(!isVisible && shouldShow){
isVisible = true;
console.log("modal is visible")
}else if(isVisible && !shouldShow){
isVisible = false;
console.log("modal is hidden")
}
});
observer.observe(html, {
attributes: true,
attributeFilter: ['class']
});
})(); |
Great @orestbida, it works! I'm able to to disable and enable fullpage.js back now. |
based on fullPage.js, there's an option called normalScrollElements: "#s-bl" |
Awesome! It works, thanks |
How can I do some action when user open modal with preferences?
I'm using fullPage.js so when I scroll in modal it scrolls my page on background instead modal. I would like to disable fullPage.js scrolling when modal is opened and enable it back when modal disappear.
The text was updated successfully, but these errors were encountered: