Template Project

Lazy-loading option preloads nearby items. It accepts array with two integers, first one – is a number of items to preload before the current, second one – the number of images to preload after the current. For examplepreload: [1,3] will load 3 next items and 1 that is before current. These values are automatically switched based on direction of movement.

By default all what it does is just searches for an image tag and preloads it with JavaScript. But you can extend it and do your custom preloading logic with help of lazyLoad event, like so:

Leave a Reply