87,907
社区成员
发帖
与我相关
我的任务
分享
var oldHeight;
$(window).resize(GetPageSize);
function GetPageSize() {
if ($(window).height() != oldheight) {
oldheight = $(window).height();
} else {
//这里我放了很多的变态的代码,但是好像精确性不是太好
alert("test");
}
}
var timer = 0;
$(window).resize(function(){
clearTimeout(timer);
timer = setTimeout(function() {
//do some sth, 但是别用alert之类的函数;
}, 200);
});