1jQuery(function($) { 2 if ($("body.single-iniciativa").length) { 3 let offset = 0; 4 const slideWidth = window.innerWidth * (window.innerWidth <= 992 ? 1/3.14 : 0.183); 5 6 $(".single-iniciativa .imagenes a:not(.more-images)").each(function(idx) { 7 this.offset = idx; 8 $(this).css({ position: "absolute", top: 0, left: this.offset * slideWidth }); 9 }); 10 11 $(".single-iniciativa .imagenes .more-images").off("click").on("click", function(e) { 12 e.preventDefault(); 13 offset--; 14 15 $(".single-iniciativa .imagenes a:not(.more-images)").each(function(idx) { 16 let left = (idx + offset) * slideWidth; 17 if (idx + offset == -1) { 18 const $this = $(this); 19 $this.css({ opacity: 0 }); 20 setTimeout(function() { 21 $this.css({ opacity: 1 }); 22 }, 300); 23 } 24 while (left < 0) left += $(".single-iniciativa .imagenes a:not(.more-images)").length * slideWidth; 25 $(this).css({ position: "absolute", top: 0, left }); 26 }); 27 28 if (offset <= -$(".single-iniciativa .imagenes a:not(.more-images)").length) { 29 offset = 0; 30 } 31 }); 32 } 33});
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.