Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jQuery Debounce Key Up
// Throttle / Debounce Plugin: http://benalman.com/projects/jquery-throttle-debounce-plugin/
$(document).ready(function() {
var callback = function(event) {
event.preventDefault();
// Do exciting things here.
};
$('form.search').on({
submit: callback,
keyup: $.debounce(350, callback)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.