This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.imagesLoaded = function () { | |
// get all the images | |
let $imgs = this.find('img[src!=""]'); | |
// if there's no images return resolved promise | |
if (!$imgs.length) {return $.Deferred().resolve().promise();} | |
// for each image, add a deferred object to the array | |
let dfdarr = []; | |
$imgs.each(function(){ |