[Pro] LazyLoad JQuery

It’s there, and it’s working, but not the way you think. This particular lazy loading implementation works by observing the current position of the image vertically with respect to the browser window. If the image is high enough in the page to appear on screen, then it will load in its default content.

If you were to make your page really tall, and therefore if the bulk of the photos on screen were “below the fold”, then you would find that the photos that were off screen would be repeat instances of the loading image you positioned (yes, on the pasteboard) off-screen.

I’ll have a look at the math inside this function (which I simply Googled for and cleaned up a little to conform to modern Prototype code practices) and see if I can determine if an image is off-screen to the right or left. That would probably help in your case, because the hidden parts of a carousel are entirely off screen to the right, at least for most normal screens. But I won’t have time to look at this today.

What you could try right now is to switch your Carousel from horizontal (default) to vertical. That will cause the layout to become ridiculously tall, and trigger the effect.

One last note: the way this is implemented will naturally work so quickly on a local (preview) page that you might not notice it working. Unlike some loaders I have seen, this one doesn’t use an Ajax call (and all of its overhead) to load in the real image, so the effect can happen so quickly that you don’t see it working, and you might be tempted to think it isn’t working. Best to test it on a server, and over a slow connection, if such a thing can be found any more.


actionsdev mailing list
Update your subscriptions at: