1$(document).ready(function() {/* 2 ** Text pin in section 3 */ 4 //gsap.registerPlugin(ScrollTrigger); 5 // Fix ios jitter 6 //ScrollTrigger.normalizeScroll(true); 7 console.log('marco-js'); 8 const title = document.querySelector('#wk_titolo_effetto h1'); 9 10 if (title) { 11 12 //ScrollTrigger.normalizeScroll(true); 13 title.innerHTML ='<span>'+title.textContent+'</span><span class="wk_titolo_nero">'+title.textContent+'</span>'; 14 15 var distanza_titolo_partenza_top=0; 16 var distanza_titolo_partenza_bottom=0; 17 var altezza_titolo=0; 18 19 function resize() { 20 distanza_titolo_partenza_top=window.pageYOffset + document.querySelector("#wk_titolo_effetto h1").getBoundingClientRect().top; 21 distanza_titolo_partenza_bottom=window.pageYOffset + document.querySelector("#wk_titolo_effetto h1").getBoundingClientRect().bottom; 22 altezza_titolo =document.querySelector("#wk_titolo_effetto h1").offsetHeight; 23 } 24 25 ScrollTrigger.addEventListener("refreshInit", resize); 26 resize(); 27 28 29 30 let tl = gsap.timeline({ 31 scrollTrigger: { 32 trigger: "body", 33 start: 1, 34 endTrigger: "#wk-titolo-arrivo", 35 end: () => "top top+="+ distanza_titolo_partenza_top, 36 pin: "#wk_titolo_effetto h1", 37 //markers:true, 38 pinSpacing: false, 39 invalidateOnRefresh: true 40 } 41 }); 42 43 44 45 46 47 gsap.fromTo( 48 ".wk_titolo_nero", 49 { 50 clipPath: "polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%)" 51 }, 52 { 53 scrollTrigger: { 54 trigger: ".wk-section-effect-content", 55 start: () => "top top+="+ distanza_titolo_partenza_bottom, 56 end: () => '+=' + altezza_titolo, 57 scrub: true, 58 //markers: true, 59 invalidateOnRefresh: true 60 }, 61 clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)", 62 ease: 'none' 63 } 64 ); 65 } else { 66 $('#wk-titolo-arrivo').closest('.elementor-section').addClass('wk-intro-base-prodotto'); 67 } 68}); /* FINE DOCUMENT READY */
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.