var timer=null; window.addEventListener('scroll',function(){ console.log("timer1:",timer) if(timer==null){ timer=setTimeout(function(){ console.log(new Date()) timer=null },300) console.log("timer2:",timer) } console.log("************") },false)
var timer=null; window.addEventListener('scroll',function(){ console.log("timer1:",timer) if(timer==null){ timer=setTimeout(function(){ console.log(new Date()) timer=null },300) console.log("timer2:",timer) } console.log("************") },false)