Animate scrollTop not working in firefox
问题 This function works fine. It scrolls the body to a desired container\'s offset function scrolear(destino){ var stop = $(destino).offset().top; var delay = 1000; $(\'body\').animate({scrollTop: stop}, delay); return false; } But not in Firefox. Why? -EDIT- To handle de double trigger in the accepted answer, I suggest stoping the element before the animation: $(\'body,html\').stop(true,true).animate({scrollTop: stop}, delay); 回答1: Firefox places the overflow at the html level, unless