Created
February 5, 2023 13:03
-
-
Save jatinkumar725/8cf48f943d759479f57f14870fbfc03a to your computer and use it in GitHub Desktop.
Solution: Event Handler
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 input = document.getElementById("myInput"); | |
let timeoutId; | |
input.addEventListener("input", function() { | |
clearTimeout(timeoutId); | |
timeoutId = setTimeout(() => { | |
console.log("input changed"); | |
}, 500); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment