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

How to combine it with fancybox ? #196

Closed
akbarsaputrait opened this issue Apr 19, 2018 · 6 comments
Closed

How to combine it with fancybox ? #196

akbarsaputrait opened this issue Apr 19, 2018 · 6 comments

Comments

@akbarsaputrait
Copy link

I use fancybox. When I use lazyload with fancybox, the image does not appear, but when I click its link, the new image will be uploaded.

@verlok
Copy link
Owner

verlok commented Apr 19, 2018

Hey @akbarsaputrait,
thanks for asking, but you really need to be more specific if you want us to understand your problem.
Can you better describe what's happening?

@akbarsaputrait
Copy link
Author

akbarsaputrait commented Apr 20, 2018

1
2

That's my code.

Before :
capture

After :
capture1

Thanks for your answer :)

@verlok
Copy link
Owner

verlok commented Apr 20, 2018

Hi @akbarsaputrait,
thank you for sharing the code.

Can you better describe what's happening? The sentence "When I use lazyload with fancybox, the image does not appear, but when I click its link, the new image will be uploaded." doesn't sound very clear to me.

@verlok
Copy link
Owner

verlok commented Apr 24, 2018

It looks like you're trying and getting some screenshots using an AJAX call, then you cycle through all the resulting data and append the images inside the element #ss_yesterday, as lazy loading images.

My question is: why are you loading those images lazily? In my opinion, you can just load them "eagerly", putting the image's URL in the src instead of the data-src. You shouldn't have performance issues since the images are already loaded after the AJAX call is complete.

@verlok
Copy link
Owner

verlok commented Apr 27, 2018

Hi @akbarsaputrait,
I've just released a demo in the demos folder of version 10.6.0 which shows you how LazyLoad should be used with a popup layer.
I didn't find the API to do so using FancyBox, so I used Magnific Popup which is much more configurable and programmable.
If you have any other questions, feel free to ask.

@verlok verlok closed this as completed Apr 27, 2018
@akbarsaputrait
Copy link
Author

@verlok Thank you so much, for your answer. I glad to know about that! 😄

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

No branches or pull requests

2 participants