For anyone interested in implementing a Lazy Load with their JQuery Tools scrollable, I used Mika Tuupola's lazy load plugin (which I had nothing to do with) found at http://www.appelsiini.net/projects/lazyload. The plugin's default functionality basically allows for images below the fold in a page (not visible on the screen) to be loaded when they are close to being visible via mouse scroll/other page nav, using $("img").lazyload().
The lazyload plugin also allows for the lazy load to be triggered on a given event. Basically what I did was using the JQuery Tools api, on the onSeek event I added a trigger on each lazy loaded image - custom JQuery event "Foo".
Foo is an empty event bound to the images to lazy load in the scrollable.
Even though Foo is an empty event, when the event Foo is called, lazy load is then triggered for each image Foo was bound to, using lazy load "event" parameter.
Thats pretty much the gist. I'm sure it could've been done better, but I haven't had the chance to refactor yet.
The lazyload plugin also allows for the lazy load to be triggered on a given event. Basically what I did was using the JQuery Tools api, on the onSeek event I added a trigger on each lazy loaded image - custom JQuery event "Foo".
api.onSeek(function(event, i) {
$(LazyItemID).trigger(Foo);
...
});
Foo is an empty event bound to the images to lazy load in the scrollable.
$(LazyItemID).bind(Foo, {}, function(e) { /*...*/ });
Even though Foo is an empty event, when the event Foo is called, lazy load is then triggered for each image Foo was bound to, using lazy load "event" parameter.
$(LazyItemID).lazyload({
placeholder: ... ,
event: Foo
});
Thats pretty much the gist. I'm sure it could've been done better, but I haven't had the chance to refactor yet.
