JSFiddle - React, Tailwind, and code Playground
HTML
<label for="input">Type something</label>
<input id="input" name="vorname" type="text" size="30" maxlength="30">
JavaScript
$.fn.delayKeyup = function(callback, ms){
var timer = 0;
var el = $(this);
$(this).keyup(function(){
clearTimeout (timer);
timer = setTimeout(function(){
callback(el)
}, ms);
});
return $(this);
};
$('#input').delayKeyup(function(el){
alert(el.val());
},1000);