Home Forums Feature Requests Lazy loading relationships with jquery.lazyload.js


Lazy loading relationships with jquery.lazyload.js

  • Hello,

    I have a fairly complex ACF setup where a set of 7 tabs each have a repeater field that contains a relationship (and each repeater typically has between 1 and 6 rows). This probably sounds like a little much, surely we could get by with a less complicated setup, but this is how the data is actually structured (for a magazine section, The New Yorker’s Goings On About Town).

    I’ve run across a problem where the AJAX requests for each relationship field fire on page load and tie up the browser from loading other things. So I started investigating how I might use a jQuery lazyload plugin to facilitate this.

    I’ve made some progress on that front, it actually works correctly with the tabs and scrolling to only load the relationship fields when they become visible. But I managed to break it in a way that I haven’t quite worked out.

    Anyway, I’m wondering if this is the kind of thing I might be able to submit as a pull request and get included in a future release. I’ve forked the repo on GitHub, but haven’t yet pushed my changes to a new branch. I’d be happy to though!


  • Hi @dphiffer

    Thanks for your work on this. I’m extremely busy finishing up ACF5 (which contains very smart AJAX powered post object / relationship fields).

    I’ll review your code after I get v5 to public beta.


  • Certainly something I’d be interested in (a lot of our sites use repeaters, and sometimes just a bit too many for the server to load up at one time).

    A way to lazy-load the content as you scroll down the page would be fantastic and wouldn’t eat so much resource when loading the back-end to edit, add or remove more fields!

    Sorry to beat a paralysed horse here, hopefully it’s something still on the radar.
    (Or maybe I can have a bash, too!)

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Lazy loading relationships with jquery.lazyload.js’ is closed to new replies.