This will make faster page loading. I was trying to make some function, Jcarousel Lite has already function triger..
But have no idea how to put them to Lazy Image Module - http://drupal.org/project/lazy_image_loader
Any ideas ?

Comments

benone’s picture

Here is what I wrote on LIL module project issue.
Anybody interested in checking that issue ? http://drupal.org/node/754274
I was trying to code a little but javascript is not my strong side.
If jCarousel can trigger the function to load, how to implement this function to LIL ?

benone’s picture

Hello again.

Please find out my last comment useful in this topic: http://drupal.org/node/754274#comment-2816258

For few days I am testing jCarouselLite with Lazy Image Loader which I think is really good pair of modules when you have a View of 100 thumbnails or more.

jCarouselLite would load all the thumbs to the carousel which is a little bit kick in the browsers ass :)

Maybe you will find out how to improve 'afterEnd' trigger to smoothly work with Lazy Image Loader.

If you need some testing help with a little bit of code messing, I am yours.

Thanks, Ben.

benone’s picture

I need to add that all this what I am doing is just hacking jcarousellite_views.module .
This function exactly: function jcarousellite_add_view_js($vid, $c, $options)

sinasalek’s picture

The new version users Drupal js behavior that gets triggered on ajax calls, you might want to try it. also have a look at this code, it will be called on page load, which means that you can call "Drupal.behaviors.lazy_image_loader()" again when the page changes. But i suggest you to get familiar with Drupal js behavior to implement in standard way

(function($){
  Drupal.behaviors.lazy_image_loader = function(context){
    $(function() { 
	  $(Drupal.settings.lazy_image_loader_classes).lazyload({
	    threshhold: Drupal.settings.lazy_image_loader_threshold,
	    placeholder: Drupal.settings.lazy_image_loader_placeholder,
	    event: Drupal.settings.lazy_image_loader_event,
	    effect: Drupal.settings.lazy_image_loader_effect,
	    failurelimit: Drupal.settings.lazy_image_loader_failurelimit
	  });
    });
  };
})(jQuery);