diff options
| author | topkek <topkek@users.noreply.github.com> | 2014-12-09 02:04:53 +0000 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-05 12:10:09 +0200 |
| commit | 63491b0b9a4a9325bb8f68d0c5763ac3cda68c89 (patch) | |
| tree | a185b06d1ac330ba000a93a8926e22eb0643b5c7 | |
| parent | fd2b41c1f0d1a2d091f8ee66880b230301b823cc (diff) | |
Scroll to thumbnail when shrinking an expanded image
| -rw-r--r-- | js/inline-expanding.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/inline-expanding.js b/js/inline-expanding.js index 8da66898..05300138 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -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); } } |
