Commit 93a14be43732aade08940a9f9645379678d95d49
1 parent
a715a429
Lazyload fix
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
resources/artbox-lazy.js
1 | 1 | $(function() { |
2 | + lazyInit(); | |
3 | + $(document).on('pjax:complete', function() { | |
4 | + lazyInit(); | |
5 | + }); | |
6 | + $(document).on('translated.owl.carousel', function() { | |
7 | + lazyInit(); | |
8 | + }); | |
9 | +}); | |
10 | +function lazyInit() { | |
2 | 11 | $('img.artbox-lazy').lazyload({ |
3 | 12 | skip_invisible: false |
4 | 13 | }); |
5 | 14 | lazyThreshold(); |
6 | 15 | lazyEvent(); |
7 | 16 | lazyEffect(); |
8 | -}); | |
17 | +} | |
9 | 18 | function lazyThreshold() { |
10 | 19 | $.each($('img.artbox-lazy-threshold'), function(index, value) { |
11 | 20 | var threshold = 205; | ... | ... |