Smoothdivscroll & Lazyload

I am working on a site that will house about 200+ images within the http://www.smoothdivscroll.com layout

The problem is that we need to incorporate some sort of lazyloading. The main issue I have been having is that the first images within the viewport swap src & data-original no problem. However any other items that are outside of the viewport do not swap. They still have the original transparent.gif as the source.

Read More

Here is the Lazyload file that I am using: http://pastebin.com/W05PiFLA

I have not touched the http://www.smoothdivscroll.com code at all.

Anyone know what can be done here. I am working on this for a client and timing is becoming an issue. Thanks!

Related posts

Leave a Reply

1 comment

  1. Try switch binding of the event with src change.

      image.bind('load', function(){
                                image.animate({opacity:1}, 1000).css({height:'auto'});
                                callback();
                        });
      image.attr("src", image.attr("data-original"));
    

    Instead of this

        image.attr("src", image.attr("data-original")).bind('load', function(){
                                image.animate({opacity:1}, 1000).css({height:'auto'});
                                callback();
                        });