forked from leftypol/leftypol
Scroll to thumbnail when shrinking an expanded image
This commit is contained in:
parent
fd2b41c1f0
commit
63491b0b9a
1 changed files with 2 additions and 2 deletions
|
@ -74,10 +74,10 @@ onready(function(){
|
|||
|
||||
if (still_open > 1) {
|
||||
if (e.target.getBoundingClientRect().top - padding < 0)
|
||||
$('body').scrollTop($(e.target).parent().parent().offset().top - padding);
|
||||
$(document).scrollTop($(e.target).parent().parent().offset().top - padding);
|
||||
} else {
|
||||
if (post_body[0].getBoundingClientRect().top - padding < 0)
|
||||
$('body').scrollTop(post_body.offset().top - padding);
|
||||
$(document).scrollTop(post_body.offset().top - padding);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue