节流函数
$(document).ready(function(){
var timer =null//必须有,省略节流失效
$(window).resize(function(){
clearTimeout(timer)
timer = setTimeout(function(){$("span").text(x+=1)},1300);
});
});
$(document).ready(function(){
var timer =null//必须有,省略节流失效
$(window).resize(function(){
clearTimeout(timer)
timer = setTimeout(function(){$("span").text(x+=1)},1300);
});
});