2012-04-11 57 views

回答

1
timer = 0; 
function start() { 
    $("#id").addClass("resizing"); 
} 
function stop() { 
    $("#id").removeClass("resizing"); 
} 
$(window).resize(function(){ 
    if (timer) { 
     clearTimeout(timer); 
    } 
    timer = setTimeout(stop, 1000); 
    start(); 
});