Skip to content

Commit cec5a58

Browse files
committed
Fix issue #75
1 parent 81df505 commit cec5a58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

view/frontend/web/js/lazyload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright © 2016 Ihor Vansach ([email protected]). All rights reserved.
2+
* Copyright © 2015-2017 Ihor Vansach ([email protected]). All rights reserved.
33
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
44
*
55
* Glory to Ukraine! Glory to the heroes!
@@ -86,7 +86,7 @@
8686
if (that.opt.auto_trigger) {
8787
var $w = $(window);
8888
$w.scroll(function() {
89-
if ($w.scrollTop() + $w.height() >= $(document).height() - that.opt.padding) {
89+
if ($w.scrollTop() + $w.height() >= $(that.opt.trigger_element).offset().top - that.opt.padding) {
9090
startLoading();
9191
}
9292
});

0 commit comments

Comments
 (0)