dinbror / blazy

Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
http://dinbror.dk/blazy
MIT License
2.63k stars 355 forks source link

Default lazyload image example Not working #185

Closed maya-hamdan closed 2 years ago

maya-hamdan commented 2 years ago

I always use it now its not working NOW!! help

  1. my b-lazy version: v1.8.2 - 2016.10.25
  2. init the library $(document).ready(function () { var bLazy = new Blazy({}); });
  3. my html img: <img class="b-lazy" data-src="./imgs/home/banner_png.png" alt="">

note: no errors in the console, and I tried logging the bLazyobject it logged in my console note: I tried Using this code didn't print anything in my console: var bLazy = new Blazy({ success: function (ele) { // Image has loaded // Do your business here console.log('yes', ele); } , error: function (ele, msg) { if (msg === 'missing') { console.log('missing', ele); } else if (msg === 'invalid') { console.log('invalid', ele); } } });