摘要:
function copy(source,destination) { var sourceCopy = source instanceof Array ? [] : {}; for (var item in source) { sourceCopy[item] = typeof source[item] === 'object' && d...
阅读全文
posted @ 2017-03-10 18:03
codeing-or-artist-??
阅读(202)
推荐(0)
编辑
摘要:
var timeChunk = function(ary,fn,count){ var obj, t; var len = ary.length; var start = function(){ for(var i=0; i<Math.min(count || 1, ary.length); i++...
阅读全文
posted @ 2017-03-10 11:08
codeing-or-artist-??
阅读(269)
推荐(0)
编辑
摘要:
var throttle = function(fn,interval){ var _self = fn,//保存需要被延迟执行的函数引用 timer,//定时器 firstTime = true;//是否是第一次调用 return function(){ var args = argume...
阅读全文
posted @ 2017-03-10 10:54
codeing-or-artist-??
阅读(236)
推荐(0)
编辑