Closed westonruter closed 10 years ago
/cc @shaunandrews
My personal favorite is
$('html, body').animate({scrollTop: $(elem).offset().top }, 250);
@bobbravo2 I think that is what we had initially, but I was concerned that it wouldn't work if the widget was inside of another scrolling container. The animation to scroll into view should not get invoked if the widget can already be seen. So we need logic to detect if the widget is currently in view to begin with.
Moved to Trac: https://core.trac.wordpress.org/ticket/27358
The current
scrollIntoView
is woefully inadequate.Builds on and #5 and #13