1//Efreet-Slider-Plugin 1.00 (C) 2019 by Andreas Mennel, Germany. All rights reserved. Requires jQuery 1.7+. 2let pxE = jQuery.noConflict(); 3let ES = [ 4 img = null, 5 time = null, 6 count = null, 7 pause = null, 8 length = null, 9 slider = null, 10 current = null, 11 interval = null, 12 visible = null, 13 last = null 14]; 15function ContentFading(){ 16 pxE('.efreet-slider ul li:eq('+ES.current+') p').addClass(ES.img.eq(ES.current).children('p').data('move')); 17 pxE('.efreet-slider ul li:eq('+ES.current+') a').addClass(ES.img.eq(ES.current).children('a').data('move')); 18} 19function Inc(){ 20 ES.current++; 21 if(ES.current > ES.length) ES.current = 0; 22} 23function Dec(){ 24 ES.current--; 25 if(ES.current < 0) ES.current = ES.length; 26} 27function ImageSlide(){ 28 ES.img.removeClass(); 29 ES.visible = ES.current; 30 setTimeout(function(){ ES.img.eq(ES.last).addClass('none'); ES.last++; if(ES.last > ES.length - 1) ES.last = -1; }, 400); 31 ES.img.eq(ES.current).addClass('show'); 32 ES.slider.children('div').children('span').eq(ES.current).children('b').css('animation','filling '+ES.time+'s linear'); 33 ContentFading(); 34 ES.img.eq(ES.current).siblings().children(':not(.left):not(.right)').removeClass(); 35 ES.slider.children('div').children('span').eq(ES.current).siblings().children('b').css('animation','none'); 36 ES.count = 0; 37} 38function Slide(start){ 39 clearInterval(ES.interval); 40 if(start == 1) ES.interval = setInterval(function(){ if(ES.pause == 0 && (ES.count / 10) >= ES.time){ ImageSlide(); Inc(); } ES.count++; }, 100); 41} 42function SliderInit(){ 43 function SVG(css, path){ return'<svg width="28" height="40" class="'+css+'"><path d="'+path+'" fill="#FFF" stroke="#000" stroke-opacity="0.4"/></svg>'; } 44 pos = ''; 45 ES.img = pxE('.efreet-slider ul li'); 46 ES.img.eq(0).addClass('first'); 47 ES.last = -1; 48 ES.time = parseInt(ES.slider.data('interval')); 49 ES.slider.css({'width' : ES.slider.data('width'),'height' : ES.slider.data('height')}).append(SVG('next','M8,0L28,20L8,40L0,32L12,20L0,8Z') + SVG('prev','M20,0L0,20L20,40L28,32L16,20L28,8Z')); 50 ES.img.children('i').each(function(){ if(pxE(this).data('src')) pxE(this).css('background','url('+pxE(this).data('src')+') center center / cover'); pos += '<span style="width:'+((100 - ES.img.length) / ES.img.length)+'%"><b></b></span>'; }); 51 ES.img.children('img').each(function(){ pos += '<span style="width:'+((100 - ES.img.length) / ES.img.length)+'%"><b></b></span>'; }); 52 ES.slider.mouseenter(function(e){ ES.pause = 1; Slide(0); e.stopPropagation(); }).mouseleave(function(e){ ES.pause = 0; Slide(1); e.stopPropagation(); }).append('<div class="efreet-zone">'+pos+'</div>'); 53 ES.length = ES.img.length - 1; 54 ES.current = 0; 55 ContentFading(); 56 ES.current = 1; 57 ES.count = 0; 58 ES.pause = 0; 59 ES.visible = 0;
60 Slide(1); 61 ES.slider.children('div').children('span').eq(0).children('b').css('animation','filling '+ES.time+'s linear'); 62 pxE('body').on('click','.efreet-slider .next', function(e){ e.stopPropagation(); ES.current = ES.visible; Inc(); ImageSlide(); Inc(); }); 63 pxE('body').on('click','.efreet-slider .prev', function(e){ e.stopPropagation(); ES.current = ES.visible; Dec(); ImageSlide(); Inc(); }); 64 pxE('body').on('click','.efreet-slider div span', function(e){ e.stopPropagation(); ES.current = pxE(this).index(); ImageSlide(); Inc(); }); 65 ES.slider.find('.ring').remove(); 66} 67pxE(window).on('load resize',function(){ 68 ES.slider = pxE('.efreet-slider'); 69 if(ES.slider.length > 0 && ES.slider.is(':visible')) SliderInit(); 70});
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.