ApoorvSaxena/lozad.js

tried script with following code and images completely disappeared.

inglesuniversal opened this issue · 1 comments

IMPORTANT: Code has been in use for over a year... but loading times for over 70 logos is not what I want

--> setup lozad.js

const observer = lozad(); // lazy loads elements with default selector as '.lozad' observer.observe();

--> fetch json file with radio stations...

--> looped through every record which has the StationNameLogo.png for every radio station

data.forEach(obj => { $('tbody').append("<tr id="+counter+"><td class=\"label-cell\"><button onclick=\"playStation("+counter+");\"><img class=\"lozad stationlogo\" data-src="+stationLogo+"></button></td><td class=\"label-cell\">"+channel+"</td><td class=\"label-cell\">"+genre+"</td></tr>"); } else { offLine++; } }); });

--> images simply disappear and no error is shown on console.logs

Any pointers or suggestions.

STAY SAFE --> the world needs Developers like you!

@inglesuniversal Codepen sample would be appreciated to debug