From 3a962ab236a5aada7a63d5020ee1d65dc6c89296 Mon Sep 17 00:00:00 2001 From: Zem Zheng Date: Mon, 20 Jul 2015 16:13:05 +0800 Subject: [PATCH] Fixed #272 : I need an new option( onpreloaderror ) to see if it fail to load the image --- jquery.lazyload.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jquery.lazyload.js b/jquery.lazyload.js index 26fab660..8f6f070c 100644 --- a/jquery.lazyload.js +++ b/jquery.lazyload.js @@ -127,6 +127,7 @@ settings.load.call(self, elements_left, settings); } }) + .on( "error", settings.onpreloaderror ) .attr("src", $self.attr("data-" + settings.data_attribute)); } });