Take a look at jQuery Debounce.
$('#search').keyup($.debounce(function() {
// Will only execute 300ms after the last keypress.
}, 300));
More Related Contents:
- How do I attach events to dynamic HTML elements with jQuery? [duplicate]
- jQuery .live() vs .on() method for adding a click event after loading dynamic html
- How to capture the browser window close event?
- How to set file input value when dropping file on page? [duplicate]
- Detecting Browser Autofill
- How to order events bound with jQuery
- Firing event on DOM attribute change
- How to trigger the window resize event in JavaScript?
- JavaScript / jQuery: Test if window has focus
- How to unbind a listener that is calling event.preventDefault() (using jQuery)?
- Handling key-press events (F1-F12) using JavaScript and jQuery, cross-browser
- How can I listen for a click-and-hold in jQuery?
- prevent Scroll bubbling from element to window
- jQuery: How to get the event object in an event handler function without passing it as an argument?
- Listening for Youtube Event in JavaScript or jQuery
- JavaScript: DOM load events, execution sequence, and $(document).ready()
- How do you detect the clearing of a “search” HTML5 input?
- JS Events: hooking on value change event on text inputs
- how to move a div with arrow keys
- How can I get jQuery .val() AFTER keypress event?
- jQuery events .load(), .ready(), .unload()
- Get the clicked object that triggered jquery blur() event [duplicate]
- How to know if .keyup() is a character key (jQuery)
- How do I handle a click anywhere in the page, even when a certain element stops the propagation?
- Prevent onclick action with jQuery
- jQuery – How can I temporarily disable the onclick event listener after the event has been fired?
- jquery/javascript: function(e){…. what is e? why is it needed? what does it actually do/accomplish?
- Is there an equivalent to e.PageX position for ‘touchstart’ event as there is for click event?
- Fire oninput event with jQuery
- addEventListener to iFrame