Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var targetNode = document.getElementsByClassName('containerModal')[0];
- var observer = new MutationObserver(function() {
- if (targetNode.style.opacity == '0') {
- document.body.style.overflow = "visible";
- }
- if (targetNode.style.opacity == '1') {
- document.body.style.overflow = "hidden";
- }
- });
- observer.observe(targetNode, {
- attributes: true,
- childList: true
- });
Add Comment
Please, Sign In to add comment