Swiper.js Official website: http://www.swiper.com.cn/api/Images/2015/0308/213.html
Set to True to turn on picture lazy loading, making preloadimages invalid.
The src tag of the image will need to be rewritten as DATA-SRC and the class name Swiper-lazy added.
Lazy loading of the background graph increases the property Data-background (3.0.7 start).
Lazyloadinginprevnextamount
Sets the number of slide in advance when the picture is delayed loading. The number must be less than Slidesperview.
The default is 1, 1 slide loading pictures in advance, for example, when switching to the third slide, load the picture in the fourth slide.
Examples of how to use
<script> var myswiper = new Swiper ('. Swiper-container ', {lazyloading:true,lazyloadinginprevnext:true, Lazyloadinginprevnextamount:2,}) </script>
Callback
Http://www.swiper.com.cn/api/callbacks/2014/1217/91.html
callback function that executes when swiper transitions from the current slide to another slide. In the case of a touch, this function is not triggered when the slide is released without a transition condition, and Ontransitionstart is available at this time.
The Swiper instance can be accepted as a parameter, and the output Activeindex is the slide index after the transition.
Examples of how to use
<script language= "JavaScript" > var myswiper = new Swiper ('. Swiper-container ', {onslidechangestart:function ( Swiper) { alert (swiper.activeindex); }}) </script>
Swiper.js lazy loading of multiple picture pages lazyloading