mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
fixing documentation for throttle.
This commit is contained in:
11
index.html
11
index.html
@@ -798,11 +798,12 @@ $(window).scroll(throttled);
|
||||
<p id="debounce">
|
||||
<b class="header">debounce</b><code>_.debounce(function, wait)</code>
|
||||
<br />
|
||||
Repeated calls to a debounced function will postpone it's execution
|
||||
until after <b>wait</b> milliseconds have elapsed. Useful for implementing
|
||||
behavior that should only happen <i>after</i> the input has stopped arriving.
|
||||
For example: rendering a preview of a Markdown comment, recalculating a
|
||||
layout after the window has stopped being resized...
|
||||
Calling a debounced function will postpone its execution until after
|
||||
<b>wait</b> milliseconds have elapsed since the last time the function
|
||||
was invoked. Useful for implementing behavior that should only happen
|
||||
<i>after</i> the input has stopped arriving. For example: rendering a
|
||||
preview of a Markdown comment, recalculating a layout after the window
|
||||
has stopped being resized...
|
||||
</p>
|
||||
<pre>
|
||||
var lazyLayout = _.debounce(calculateLayout, 300);
|
||||
|
||||
Reference in New Issue
Block a user