Answers for "delay input javascript"

0

delay input javascript

let delayTimer;
function doSearch(text) {
    clearTimeout(delayTimer);
    delayTimer = setTimeout(function() {
        // Do the ajax stuff
    }, 1000); // Will do the ajax stuff after 1000 ms, or 1 s
}
Posted by: Guest on January-17-2022

Browse Popular Code Answers by Language