Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. var roundButton = document.querySelector ("#roundButton");
  2. var flyoutMenu = document.querySelector ("#task-list-modal");
  3. var taskList = document.querySelector("#task-list");
  4.  
  5. roundButton.addEventListener("click", showMenu, false);
  6. flyoutMenu.addEventListener("click", hideMenu, false);
  7. taskList.addEventListener("click", stopEvent);
  8.  
  9. function stopEvent(e) {
  10. console.log('stop');
  11. e.stopPropagation();
  12. }
  13. function showMenu(e) {
  14. flyoutMenu.classList.add("show");
  15. }
  16. //Function to hide modal on click
  17. function hideMenu(e) {
  18. console.log('hide-menu');
  19. flyoutMenu.classList.remove("show");
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement