摘要:
function debounce(fn, delay) { var ctx; var args; var timer = null; var later = function () { fn.apply(ctx, args); // 当事件真正执行后,清空定时器 timer = null; }; 阅读全文
摘要:
function debounce(fn, delay) { var ctx; var args; var timer = null; var later = function () { fn.apply(ctx, args); // 当事件真正执行后,清空定时器 timer = null; }; 阅读全文