1// SETUP FUNCTION 2 3 (function($){ 4 5 var initializeBlockAlternateBoxesBlock = function( $block ) { 6 7 $(document).ready(function() { 8 9 ScrollTrigger.matchMedia({ 10 11 "(min-width: 1200px)": function() { 12 13 // DARKEN 14 15 const sideimages = gsap.utils.toArray('.effects-darken .overlay'); 16 17 sideimages.forEach(sideimage => { 18 19 const darken = gsap.fromTo(sideimage, { backgroundColor: "rgba(0,0,0,0)" },{ backgroundColor: "rgba(0,0,0,0.8)" }) 20 21 ScrollTrigger.create({ 22 trigger: sideimage, 23 start: "top top", 24 end: 300, 25 scrub: true, 26 ease: "power2", 27 animation: darken 28 //onEnter: () => 29 // gsap.to($section, { backgroundColor: "#232E3E", overwrite: "auto" }), 30 //onLeaveBack: () => 31 // gsap.to($section, { backgroundColor: "white", overwrite: "auto" }) 32 }); 33 34 }); 35 36 // LIGHTEN 37 38 const sideimages2 = gsap.utils.toArray('.effects-lighten .overlay'); 39 40 sideimages2.forEach(sideimage2 => { 41 42 const lighten = gsap.fromTo(sideimage2, { backgroundColor: "rgba(0,0,0,0.8)" },{ backgroundColor: "rgba(0,0,0,0)" }) 43 44 ScrollTrigger.create({ 45 trigger: sideimage2, 46 start: "top top", 47 end: 300, 48 scrub: true, 49 ease: "power2", 50 animation: lighten 51 //onEnter: () => 52 // gsap.to($section, { backgroundColor: "#232E3E", overwrite: "auto" }), 53 //onLeaveBack: () => 54 // gsap.to($section, { backgroundColor: "white", overwrite: "auto" }) 55 }); 56 57 }); 58 59 } 60 61 }); 62 63 }); 64 65 } 66 67 $(document).ready(function(){ 68 initializeBlockAlternateBoxesBlock(); 69 }); 70 71 if( window.acf ) { 72 window.acf.addAction( 'render_block_preview/type=alternate-boxes-block', initializeBlockAlternateBoxesBlock ); 73 } 74 75 })(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.