Store scroll offset in cache back button
This commit is contained in:
parent
ea2c7d2f36
commit
2a4882f598
1 changed files with 2 additions and 0 deletions
|
@ -476,6 +476,7 @@ $(function() {
|
||||||
"html": $contentClone.html(),
|
"html": $contentClone.html(),
|
||||||
"page": window.page,
|
"page": window.page,
|
||||||
"has_next_page": window.has_next_page,
|
"has_next_page": window.has_next_page,
|
||||||
|
"scrollOffset": $(window).scrollTop(),
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
if (window.performance &&
|
if (window.performance &&
|
||||||
|
@ -487,6 +488,7 @@ $(function() {
|
||||||
content = JSON.parse(content);
|
content = JSON.parse(content);
|
||||||
$('#content').html(content.html);
|
$('#content').html(content.html);
|
||||||
onWindowReady();
|
onWindowReady();
|
||||||
|
$(window).scrollTop(content.scrollOffset);
|
||||||
window.page = content.page;
|
window.page = content.page;
|
||||||
window.has_next_page = content.has_next_page;
|
window.has_next_page = content.has_next_page;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue