Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tried script with following code and images completely disappeared. #240

Open
inglesuniversal opened this issue Jun 11, 2020 · 1 comment

Comments

@inglesuniversal
Copy link

inglesuniversal commented Jun 11, 2020

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!

@ApoorvSaxena
Copy link
Owner

@inglesuniversal Codepen sample would be appreciated to debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants