Guest User

Untitled

a guest
Feb 16th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. var targetNode = document.getElementsByClassName('containerModal')[0];
  2. var observer = new MutationObserver(function() {
  3. if (targetNode.style.opacity == '0') {
  4. document.body.style.overflow = "visible";
  5. }
  6. if (targetNode.style.opacity == '1') {
  7. document.body.style.overflow = "hidden";
  8. }
  9. });
  10. observer.observe(targetNode, {
  11. attributes: true,
  12. childList: true
  13. });
Add Comment
Please, Sign In to add comment