Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var roundButton = document.querySelector ("#roundButton");
- var flyoutMenu = document.querySelector ("#task-list-modal");
- var taskList = document.querySelector("#task-list");
- roundButton.addEventListener("click", showMenu, false);
- flyoutMenu.addEventListener("click", hideMenu, false);
- taskList.addEventListener("click", stopEvent);
- function stopEvent(e) {
- console.log('stop');
- e.stopPropagation();
- }
- function showMenu(e) {
- flyoutMenu.classList.add("show");
- }
- //Function to hide modal on click
- function hideMenu(e) {
- console.log('hide-menu');
- flyoutMenu.classList.remove("show");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement