Created
August 11, 2021 15:22
-
-
Save apelmahmudDev/f7f5f2242fab8721900d3627c623c83c to your computer and use it in GitHub Desktop.
event-delegation-example 2
This file contains hidden or 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
জাভাস্ক্রিপ্ট | |
const palette = document.querySelector('#palette'); | |
palette.addEventListener('click', handleColorClick); | |
function handleColorClick(el) { | |
console.log(`You clicked on this color: ${el.target.style.backgroundColor}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
event-delegation-example 2