jQuery throttle / debounce v1.1

|

While this plugin was initially one of my jQuery Misc plugins, it seemed useful enough to “promote” to its own project page. Congratulations jQuery throttle / debounce, you’ve “made it big!”

That being said, jQuery throttle / debounce allows you to rate-limit your functions in multiple useful ways. Passing a delay and callback to $.throttle returns a new function that will execute no more than once every delay milliseconds. Passing a delay and callback to $.debounce returns a new function that will execute only once, coalescing multiple sequential calls into a single execution at either the very beginning or end.

Just take a look at the project page to see more explanations (both textual and visual), documentation and working examples!

If you have any feedback or suggestions, please leave them in the comments, and if you find this plugin useful, please donate!

Post A Comment

  • Any of these HTML tags may be used for style: a, b, i, br, p, strong, em, pre, code.
  • Multi-line JavaScript code should be wrapped in <pre class="brush:js"></pre>
    (supported syntax highlighting brushes: js, css, php, plain, bash, ruby, html, xml)
  • Use &lt; instead of < and &gt; instead of > in the examples themselves.