var timer = null;
$(window).on('事件名称',function(){
if(timer){
clearTimeout(timer)
}
timer = setTimeout(function(){
//执行相应函数
},400);
}
);