From 93a14be43732aade08940a9f9645379678d95d49 Mon Sep 17 00:00:00 2001 From: yarik Date: Thu, 15 Dec 2016 15:41:54 +0200 Subject: [PATCH] Lazyload fix --- resources/artbox-lazy.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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