Merge pull request #842 from bezoerb/debounce-doc-fix

Fixed documentation for debounce. [ci skip]
This commit is contained in:
John-David Dalton
2014-12-29 08:24:56 -06:00

View File

@@ -6951,13 +6951,13 @@
* jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* });
* }));
*
* // ensure `batchLog` is invoked once after 1 second of debounced calls
* var source = new EventSource('/stream');
* jQuery(source).on('message', _.debounce(batchLog, 250, {
* 'maxWait': 1000
* }, false);
* }));
*
* // cancel a debounced call
* var todoChanges = _.debounce(batchLog, 1000);