Skip to content

Instantly share code, notes, and snippets.

@JDMcKinstry
Created March 19, 2012 19:16
Show Gist options
  • Select an option

  • Save JDMcKinstry/2124860 to your computer and use it in GitHub Desktop.

Select an option

Save JDMcKinstry/2124860 to your computer and use it in GitHub Desktop.
$("#inputID").keypress(function(e){
if (tmrStopType!= undefined) clearTimeout(tmrStopType);
tmrStopType= setTimeout(function (){ stopTypeWork() }, 2000);
});
function stopTypeWork() {
// do work
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment