Force jQuery LazyLoad to Appear

Sometimes, you need to manually trigger the lazyload even though you want it to respond to scroll events normally.

Simply trigger the `appear` event to force lazyload to load the image.

This is applicable in my case when for example I am using lazyload on a gallery slider where the user may scroll down to it, or use a button to trigger the new slides to appear.

Example:

$("img.lazy").trigger(‘appear’);

The answer was in the source. Always look in the source.

3 Comments

  1. tpr says:

    Great tip, thanks!

  2. mc says:

    this loads all images initially so the purpose of lazy load during scroll fades away

Leave a Comment