From 7abc8d946dc3375f9461a908cf529e9d912b8e73 Mon Sep 17 00:00:00 2001 From: taylorKonigsmark Date: Sun, 31 Jan 2016 15:01:36 -0600 Subject: [PATCH] Feature for event handling when image is lazy loaded --- README.markdown | 1 + slick/slick.js | 1 + 2 files changed, 2 insertions(+) diff --git a/README.markdown b/README.markdown index ba9a49b44..cbebd1005 100644 --- a/README.markdown +++ b/README.markdown @@ -182,6 +182,7 @@ init | event, slick | When Slick initializes for the first time callback. Note t reInit | event, slick | Every time Slick (re-)initializes callback setPosition | event, slick | Every time Slick recalculates position swipe | event, slick, direction | Fires after swipe/drag +lazyLoaded | event, slick, image | Fires after image loads lazily #### Methods diff --git a/slick/slick.js b/slick/slick.js index 55fd6c8fc..8175ada40 100644 --- a/slick/slick.js +++ b/slick/slick.js @@ -1461,6 +1461,7 @@ .removeAttr('data-lazy') .removeClass('slick-loading'); }); + _.$slider.trigger('lazyLoaded', [_, image]); }); };