var timerHandle = null; $("input[name=myInput]").keyup(function(){ if ( timerHandle != null ) { clearTimeout( timerHandle ); } timerHandle = setTimeout(function(){ $('#myForm').ajaxSubmit(options); }, 2000 ); });