This commit is contained in:
Baris Soner Usakli
2014-01-09 15:58:31 -05:00
parent 1caaa8c20a
commit 9c60182da4
2 changed files with 11 additions and 8 deletions

View File

@@ -996,13 +996,13 @@ define(['composer'], function(composer) {
return;
}
var container = $(document.body),
var container = $(window),
scrollTo = $('#post_anchor_' + pid),
tid = $('#post-container').attr('data-tid');
function animateScroll() {
$('body,html').animate({
scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop() - $('#header-menu').height()
$('window,html').animate({
scrollTop: scrollTo.offset().top + container.scrollTop() - $('#header-menu').height()
}, 400);
}