1$(function() { 2 3 new Splide( '.stats', { 4 type: 'fade', 5 pagination: false, 6 autoplay: true, 7 rewind: true, 8 speed: 400, 9 arrows: false, 10 pauseOnHover: false 11 }).mount(); 12 13 new Splide( '.testimonials', { 14 type: 'fade', 15 autoplay: true, 16 rewind: true, 17 speed: 600, 18 arrows: false 19 }).mount(); 20 21 function scroller(event) { 22 const block = event.target.dataset.anchor; 23 document.getElementById(block).scrollIntoView({ behavior: 'smooth'}); 24 } 25 26 document.querySelectorAll('.events-right-heading').forEach((elem) => { 27 elem.addEventListener('click', scroller); 28 }); 29 30 const observer = new IntersectionObserver(function(entries) { 31 const easing = "linear"; 32 if(entries[0].isIntersecting === true) { 33 $('.events-right-events .events-accordion').slideDown({duration:300, easing:easing}); 34 $('.events-right-initiatives .events-accordion').slideUp({duration:300, easing:easing}); 35 $('.events-right-bookbank .events-accordion').slideUp({duration:300, easing:easing}); 36 //console.log('Element has just become visible in screen'); 37 } 38 39 }, { threshold: .5, root: null }); 40 const observer2 = new IntersectionObserver(function(entries) { 41 const easing = "linear"; 42 if(entries[0].isIntersecting === true) { 43 $('.events-right-events .events-accordion').slideUp({duration:300, easing:easing}); 44 $('.events-right-initiatives .events-accordion').slideUp({duration:300, easing:easing}); 45 $('.events-right-bookbank .events-accordion').slideDown({duration:300, easing:easing}); 46 //console.log('Element has just become visible in screen'); 47 } 48 49 }, { threshold: 1, root: null }); 50 const observer3 = new IntersectionObserver(function(entries) { 51 const easing = "linear"; 52 if(entries[0].isIntersecting === true) { 53 54 $('.events-right-events .events-accordion').slideUp({duration:300, easing:easing}); 55 $('.events-right-initiatives .events-accordion').slideDown({duration:300, easing:easing}); 56 $('.events-right-bookbank .events-accordion').slideUp({duration:300, easing:easing}); 57 //console.log('Element has just become visible in screen'); 58 } 59 60 }, { threshold: .6, root: null }); 61 observer.observe(document.querySelector(".events-left-events")); 62 observer2.observe(document.querySelector(".events-left-bookbank")); 63 observer3.observe(document.querySelector(".events-left-initiatives")); 64 65}); 66 67 68 69
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.