节流函数
$(document).ready(function(){
var timer =null//必须有,省略节流失效
$(window).resize(function(){
clearTimeout(timer)
timer = setTimeout(function(){$("span").text(x+=1)},1300);
});
});
标签:ext log 函数 down += settime body out div
$(document).ready(function(){
var timer =null//必须有,省略节流失效
$(window).resize(function(){
clearTimeout(timer)
timer = setTimeout(function(){$("span").text(x+=1)},1300);
});
});
标签:ext log 函数 down += settime body out div
原文地址:http://www.cnblogs.com/huangxingyuan/p/8075641.html