1(function(document, window, $){ 2 var testimonials = { 3 options: { 4 elms: { 5 parent: '.testimonials__wrap' 6 } 7 }, 8 init: function(){ 9 var _t=this, _o=_t.options; 10 if($(_o.elms.parent).length){ 11 _t.build(); 12 _t.slider(); 13 } 14 }, 15 slider: function(){ 16 // flexslider with lazy load 17 window.testimonialsSlider = $('.flex-bullet-slider-lazy').flexslider({ 18 touch: true, 19 directionNav: false, 20 slideshowSpeed: 10000, 21 initDelay: 0, 22 directionNav: false, 23 prevText: "", 24 nextText: "", 25 animation: "fade", 26 start: function (slider) { // Fires when the slider loads the first slide 27 var slides = slider.slides, 28 index = slider.animatingTo, 29 $slide = $(slides[index]); 30 31 $slide.find('img[data-src]').each(function() { 32 var src = $(this).attr('data-src'); 33 $(this).attr('src', src).removeAttr('data-src'); 34 var srcset = $(this).attr('data-srcset'); 35 if(srcset) $(this).attr('srcset', srcset).removeAttr('data-srcset'); 36 }); 37 }, 38 before: function(slider) { 39 var slides = slider.slides, 40 index = slider.animatingTo, 41 $slide = $(slides[index]); 42 43 $slide.find('img[data-src]').each(function() { 44 var src = $(this).attr('data-src'); 45 $(this).attr('src', src).removeAttr('data-src'); 46 var srcset = $(this).attr('data-srcset'); 47 if(srcset) $(this).attr('srcset', srcset).removeAttr('data-srcset'); 48 }); 49 } 50 }); 51 52 // Flexslider fixed height 53 const evenSliderHeight = function(slideContainer, slideItem) { 54 let slider_height = 0; 55 const $slider_slide = $(slideContainer).find(slideItem); 56 $slider_slide.each(function() { 57 const __height = $(this).outerHeight(true); 58 if ( slider_height < __height ) { 59 slider_height = __height; 60 } 61 }); 62 $slider_slide.css('min-height', slider_height); 63 }; 64 evenSliderHeight('.flex-bullet-slider-lazy', '.left-line'); 65 }, 66 build: function(){ 67 var _t=this, _o=_t.options; 68 $(_o.elms.parent).each(function(){ 69 var content = $(this).text(); 70 }); 71 }, 72 73 }; 74 75 $(document).ready(function () { 76 testimonials.init(); 77 }); 78 79})(document, window, jQuery);
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.