We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04878f9 commit aa0222eCopy full SHA for aa0222e
layout/_third-party/comments/disqus.swig
@@ -28,8 +28,12 @@
28
loadComments();
29
} else {
30
$(window).on('scroll.disqus_scroll', function () {
31
+ // offsetTop may changes because of manually resizing browser window or lazy loading images.
32
+ var offsetTop = $('#comments').offset().top - $(window).height();
33
var scrollTop = $(window).scrollTop();
- if (scrollTop >= offsetTop) {
34
+
35
+ // pre-load comments a bit? (margin or anything else)
36
+ if (offsetTop - scrollTop < 60) {
37
$(window).off('.disqus_scroll');
38
39
}
0 commit comments