Guest User

Untitled

a guest
Aug 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. let overlay = document.querySelector('.overlay'),
  2. close = document.querySelector('.popup-close');
  3.  
  4. document.addEventListener('click', function(event) {
  5. let target = event.target;
  6.  
  7. if (target.className == 'description-btn' || target.className == 'more')
  8. {
  9. target.classList.add('more-splash');
  10. overlay.style.display = "block";
  11. document.body.style.overflow = 'hidden';
  12. }
  13.  
  14. if (target.className == 'popup-close') {
  15.  
  16. target.classList.remove('more-splash');
  17. overlay.style.display = "none";
  18. document.body.style.overflow = '';
  19. }
Add Comment
Please, Sign In to add comment