Update _.debounce and _.throttle doc examples and rebuild.

Former-commit-id: fc094e857aeae0ab9581ad56dca894cc96bc7b2e
This commit is contained in:
John-David Dalton
2013-04-19 01:02:36 -07:00
parent a707c2fe8e
commit 038b1bcf7b
8 changed files with 319 additions and 279 deletions

View File

@@ -4476,6 +4476,11 @@
*
* var lazyLayout = _.debounce(calculateLayout, 300);
* jQuery(window).on('resize', lazyLayout);
*
* jQuery('.postbox').on('click', _.debounce(sendMail, 200, {
* 'leading': true,
* 'trailing': false
* });
*/
function debounce(func, wait, options) {
var args,
@@ -4699,6 +4704,10 @@
*
* var throttled = _.throttle(updatePosition, 100);
* jQuery(window).on('scroll', throttled);
*
* jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
* 'trailing': false
* }));
*/
function throttle(func, wait, options) {
var args,