Yaffs site version 1.1
[yaffs-website] / web / modules / contrib / blazy / js / blazy.load.js
index 2d9836f7ae25771b101229457d4cc3f857865091..9b13a72f31dc47158610921ab2984c7a51a6a420 100644 (file)
@@ -28,6 +28,8 @@
     },
 
     clearing: function (el) {
+      var ie = _db.hasClass(el, 'b-responsive') && el.hasAttribute('data-pfsrc');
+
       // The .b-lazy element can be attached to IMG, or DIV as CSS background.
       el.className = el.className.replace(/(\S+)loading/, '');
 
           wrapEl.className = wrapEl.className.replace(/(\S+)loading/, '');
         }
       });
+
+      // @todo: Remove when Blazy library fixes this.
+      // @see http://scottjehl.github.io/picturefill/
+      if (window.picturefill && ie) {
+        window.picturefill({
+          reevaluate: true,
+          elements: [el]
+        });
+      }
     }
   };
 
 
     // Reacts on resizing.
     if (!me.done) {
+      me.init.revalidate();
+
       _db.resize(function () {
         me.windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;