Answers for "How to trigger an event in input text after I stop typing/writing?"

1

How to trigger an event in input text after I stop typing/writing?

let typingtimer;
let timedelay = 2000
Email.addEventListener('input', ()=>{
    clearTimeout(typingtimer)
    if (Email.value){
        typingtimer = setTimeout(()=>{
            //do stuff
        }, timedelay);
    };
});
Posted by: Guest on May-05-2022

Code answers related to "How to trigger an event in input text after I stop typing/writing?"

Browse Popular Code Answers by Language