Encore PTL Encore PTL - 6 months ago 24
jQuery Question

Lazy Loading in Flexslider

I am trying to get lazy loading working for Flexslider by using Lazy Loading jquery plugin and following the instructions on this site: http://www.appelsiini.net/projects/lazyload

I am loading the plugin script and don't see any errors on console. I tried without the container or options being passed in lazyload function and still nothing. I spend hours on this.

$("img.lazy").lazyload({
effect: "fadeIn",
container: $(".slides > li")
});


Does anyone know how to get lazy loading working in Flexslider?

Answer

So I added the real image page to the data-attr attribute on the image tag and on after event fire I would find the image with active class and set the img src attribute equal to data-attr value.