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

Issue with Lazy Load and grid. #1185

Open
skigo opened this issue Mar 21, 2023 · 0 comments
Open

Issue with Lazy Load and grid. #1185

skigo opened this issue Mar 21, 2023 · 0 comments

Comments

@skigo
Copy link

skigo commented Mar 21, 2023

Hello, i am facing an issue with the lazy load on the masonry grid, i read a lot of articles but there is no working solution.

I have the following url https://www.skigoweddingstories.com/galleries/a-c-island-athens-riviera/

the website has locomotive with scroll trigger + the masonry grid with vanilla lazy load.

I use this code for the masonry grid

` if ($(".wedding-grid").length > 0) {
const lazyLoadInstance = new LazyLoad({
callback_loaded: () => {
if (typeof gridWedd !== "undefined" && gridWedd !== null) {
this.$masonryWedd = new Masonry(gridWedd, {
itemSelector: ".s-wedding__gallery__item",
columnWidth: ".grid-sizer",
percentPosition: true,
});
}
},
});

  imagesLoaded(
    document.querySelector(".wedding-grid"),
    function (instance) {
      lazyLoadInstance.update();
    }
  );`

and i tried many options for the threshold but non of them is working, some times the masonry is not initalizing at all.

Any advice?

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

1 participant