KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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);
Tags (comma-separated)
Save Edits
Cancel