var timer = null; $('#text').keydown(function(){ clearTimeout(timer); timer = setTimeout(doStuff, 1000) }); function doStuff() { alert('do stuff'); }