Last active
July 5, 2019 04:03
-
-
Save sergey-shambir/d6ca44978d038d6ff11bd609c5b2536a to your computer and use it in GitHub Desktop.
To-Do App JS, layer 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onPageLoaded() { | |
// ... | |
function createTodo() { | |
// ... | |
} | |
function onClickTodo(event) { | |
if (event.target.tagName === "LI") { | |
event.target.classList.toggle("checked"); | |
} | |
} | |
// ... | |
ul.addEventListener("click", onClickTodo); | |
// ... | |
} | |
document.addEventListener("DOMContentLoaded", onPageLoaded); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment