1;(function($){ 2 "use strict"; 3 4 $(document).ready(function() { 5 6 var enable_ios_slider = function( content ){ 7 8 function slideChange(args) { 9 var theSlider = $(args.sliderObject), 10 activeSlide = args.currentSlideNumber - 1, 11 sliderContainer = theSlider.closest('.iosslider-slideshow'); 12 // console.log(args); 13 // add active to bullets 14 sliderContainer.find('.kl-ios-selectors-block .iosslider__bull-item').removeClass('selected'); 15 sliderContainer.find('.kl-ios-selectors-block .iosslider__bull-item:eq(' + activeSlide + ')').addClass('selected'); 16 // add active class 17 theSlider.find('.iosslider__item').removeClass('kl-iosslider-active'); 18 theSlider.find('.iosslider__item:eq(' + activeSlide + ')').addClass('kl-iosslider-active'); 19 } 20 21 function sliderLoaded(args, otherSettings) { 22 var theSlider = $(args.sliderObject); 23 if (otherSettings.hideControls) theSlider.addClass('hideControls'); 24 if (otherSettings.hideCaptions) theSlider.addClass('hideCaptions'); 25 26 if(typeof( args.currentSlideNumber ) != 'undefined') { 27 slideChange(args); 28 } 29 theSlider.closest('.iosslider-slideshow').addClass('kl-slider-loaded'); 30 } 31 32 var elements = content.find('.iosSlider'); 33 34 if(elements && elements.length && (typeof($.fn.iosSlider) != 'undefined') ){ 35 $.each( elements , function(i, e){ 36 var self = $(e), 37 selfContainer = self.closest('.kl-slideshow'); 38 39 self.iosSlider({ 40 snapToChildren: true, 41 desktopClickDrag: true, 42 keyboardControls: true, 43 autoSlide: self.data('autoplay') == '1' ? true : false, 44 autoSlideTimer: self.data('trans'), 45 navNextSelector: selfContainer.find('.kl-iosslider-next'), 46 navPrevSelector: selfContainer.find('.kl-iosslider-prev'), 47 navSlideSelector: selfContainer.find('.kl-ios-selectors-block .item'), 48 scrollbar: true, 49 scrollbarContainer: selfContainer.find('.scrollbarContainer'), 50 scrollbarMargin: '0', 51 scrollbarBorderRadius: '4px', 52 onSliderLoaded: function(args){ 53 var otherSettings = { 54 hideControls : true, 55 hideCaptions : false 56 }; 57 sliderLoaded(args, otherSettings); 58 }, 59 onSlideChange: slideChange, 60 infiniteSlider: self.data('infinite') 61 }); 62 63 $( window ).on( 'debouncedresize' , function(){ 64 if(typeof($.fn.iosSlider) != 'undefined') { 65 self.iosSlider('update'); 66 } 67 }); 68 69 }); 70 } 71 }; 72 var ios_slider_p = $('.iosslider-slideshow'); 73 if (ios_slider_p){ 74 enable_ios_slider( ios_slider_p ); 75 } 76 77 });// end of document ready 78 79})(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.