Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9009119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:06:41+00:00 2026-06-16T02:06:41+00:00

Have started a project using jQuery Isotope. Initially integrated with Infinite scroll, but thought

  • 0

Have started a project using jQuery Isotope. Initially integrated with Infinite scroll, but thought it was a little clunky.

Was hoping to replace Infinite Scroll with Lazy Load, and wondered if anyone has had any luck combining the two. Any tips to get them to play nice would be great.

Thanks a mill

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:06:42+00:00Added an answer on June 16, 2026 at 2:06 am

    If you want to use isotope’s sorting/filtering functions, you will need to set the failure_limit of lazyload and trigger the event with isotope’s onLayout callback.

    jQuery(document).ready(function($) {
        var $win = $(window),
        $con = $('#container'),
        $imgs = $("img.lazy");
    
        $con.isotope({
            onLayout: function() {
                $win.trigger("scroll");
            }
        });
    
        $imgs.lazyload({
            failure_limit: Math.max($imgs.length - 1, 0)
        });
    });
    

    Explanation

    According to the docs ( http://www.appelsiini.net/projects/lazyload )

    After scrolling page Lazy Load loops though unloaded images. In loop it checks if image has become visible. By default loop is stopped when first image below the fold (not visible) is found. This is based on following assumption. Order of images on page is same as order of images in HTML code. With some layouts assumption this might be wrong.

    With an isotope sorted/filtered list, the page order is certainly different from the HTML so we need to adjust our failure_limit.

    As you can see we store the jQuery object so that we can use its length-1 as our failure_limit. If you’re curious as to why it is length-1, it’s because of the following check in lazyload’s update method.

    if (++counter > settings.failure_limit) {
        return false;
    }
    

    Lazy load on other events

    If you are not triggering your lazyloads on scroll, you will need to swap the "scroll" trigger for whichever event you are using.

    Demo

    http://jsfiddle.net/arthurc/ZnEhn/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started a project that was initially completed following Appcoda's tutorial about using
I have just started considering using the HTML 5 api for a Rails/JQuery project,
I have just started with my project using MVC and Razor. Now I am
I have a recently started project where i'm using mongoid for the database and
I have started using Linq to SQL for a project im working on and
I have just started a new project, and I am using the Delphi 2009
we have just started using a git account of our Django website project so
I just started using CakePHP for a small project. I have rails experience, and
I have just started using the AsyncController in my project to take care of
I have started using the Three20 project for an iPhone/iPad application. Did anyone face

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.