mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27: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">
|
<p id="debounce">
|
||||||
<b class="header">debounce</b><code>_.debounce(function, wait)</code>
|
<b class="header">debounce</b><code>_.debounce(function, wait)</code>
|
||||||
<br />
|
<br />
|
||||||
Repeated calls to a debounced function will postpone it's execution
|
Calling a debounced function will postpone its execution until after
|
||||||
until after <b>wait</b> milliseconds have elapsed. Useful for implementing
|
<b>wait</b> milliseconds have elapsed since the last time the function
|
||||||
behavior that should only happen <i>after</i> the input has stopped arriving.
|
was invoked. Useful for implementing behavior that should only happen
|
||||||
For example: rendering a preview of a Markdown comment, recalculating a
|
<i>after</i> the input has stopped arriving. For example: rendering a
|
||||||
layout after the window has stopped being resized...
|
preview of a Markdown comment, recalculating a layout after the window
|
||||||
|
has stopped being resized...
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
var lazyLayout = _.debounce(calculateLayout, 300);
|
var lazyLayout = _.debounce(calculateLayout, 300);
|
||||||
|
|||||||
Reference in New Issue
Block a user