You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that when using the browser to go back, "pjax:success" didn't trigger, causing you to not return to the original height, but to the top of the previous page.
The following code not work:
var scrollTo = options.scrollTo
// Ensure browser scrolls to the element referenced by the URL anchor
if (hash) {
var name = decodeURIComponent(hash.slice(1))
var target = document.getElementById(name) || document.getElementsByName(name)[0]
if (target) scrollTo = $(target).offset().top
}
The text was updated successfully, but these errors were encountered:
I found that when using the browser to go back, "pjax:success" didn't trigger, causing you to not return to the original height, but to the top of the previous page.
The following code not work:
The text was updated successfully, but these errors were encountered: