diff --git a/resources/artbox-lazy.js b/resources/artbox-lazy.js index 1d4983f..d647090 100644 --- a/resources/artbox-lazy.js +++ b/resources/artbox-lazy.js @@ -1,11 +1,20 @@ $(function() { + lazyInit(); + $(document).on('pjax:complete', function() { + lazyInit(); + }); + $(document).on('translated.owl.carousel', function() { + lazyInit(); + }); +}); +function lazyInit() { $('img.artbox-lazy').lazyload({ skip_invisible: false }); lazyThreshold(); lazyEvent(); lazyEffect(); -}); +} function lazyThreshold() { $.each($('img.artbox-lazy-threshold'), function(index, value) { var threshold = 205; -- libgit2 0.21.4