1//https://web-design-weekly.com/snippets/lazy-loading-images-flexslider/ 2var $dalene_slider=jQuery.noConflict(); 3$dalene_slider(window).load(function() { 4 $dalene_slider('.basicslider').flexslider({ 5 touch: true, 6 animation: "slide", 7 slideshow: false, 8 controlNav: true, 9 slideshowSpeed: 7000, 10 animationSpeed: 600, 11 initDelay: 0, 12 start: function(slider) { // Fires when the slider loads the first slide 13 var slide_count = slider.count - 1; 14 15 $dalene_slider(slider) 16 .find('img.lazy:eq(0)') 17 .each(function() { 18 var src = $dalene_slider(this).attr('data-src'); 19 $dalene_slider(this).attr('src', src).removeAttr('data-src'); 20 }); 21 22 $dalene_slider('.flexslider.basicslider').removeClass('loading'); 23 24 }, 25 before: function(slider) { // Fires asynchronously with each slider animation 26 var slides = slider.slides, 27 index = slider.animatingTo, 28 $slide = $dalene_slider(slides[index]), 29 $img = $dalene_slider.find('img[data-src]'), 30 current = index, 31 nxt_slide = current + 1, 32 prev_slide = current - 1; 33 34 $slide 35 .parent() 36 .find('img.lazy:eq(' + current + '), img.lazy:eq(' + prev_slide + '), img.lazy:eq(' + nxt_slide + ')') 37 .each(function() { 38 var src = $dalene_slider(this).attr('data-src'); 39 $dalene_slider(this).attr('src', src).removeAttr('data-src'); 40 }); 41 } 42 }); 43});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.