1jQuery(document).ready(function($){ 2 var marginLucarne = $('#articles').width(); 3 var $blocImages = $('#allarticles'); 4 var $images = $('#allarticles article'); 5 var nbImages = $images.length; 6 var largeur_fenetre = $(window).width(); 7 8 if (largeur_fenetre > 820) { 9 var etapeMax = Math.ceil(nbImages/3) - 1; 10 } else if (largeur_fenetre > 550) { 11 var etapeMax = Math.ceil(nbImages/2) - 1; 12 } else { 13 var etapeMax = nbImages - 1; 14 } 15 16 var etapeCourante = 0; 17 var ulPuce = $('.puce-liste').find('ul'); 18 19 for (var i = 0;i <= etapeMax; i++) { 20 ulPuce.append('<li></li>'); 21 } 22 23 var largeurLi = (etapeMax + 1) * 25; 24 $('.puce-liste').css('width', largeurLi); 25 26 var liPuce = ulPuce.find('li'); 27 liPuce.eq(0).addClass('active'); 28 29 function play(){ 30 lecture = setInterval(function(){ 31 if (etapeCourante <= etapeMax){ 32 $('.active').removeClass('active'); 33 liPuce.eq(etapeCourante).addClass('active'); 34 $blocImages.animate({ marginLeft: -etapeCourante * marginLucarne}, 500) 35 36 if(etapeCourante == etapeMax){ 37 etapeCourante = 0; 38 } else { 39 etapeCourante++; 40 } 41 } 42 }, 3500); 43 }; 44 45 play(); 46 47 function stop(){ 48 clearInterval(lecture); 49 }; 50});
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.