https://annualreport.ejtn.eu/wp-content/themes/annual-report/assets/js/functions-front.js?ver=1.0.31
1if (window.$ == undefined) { 2 window.$ = jQuery.noConflict(); 3} 4jQuery(document).ready(function($) { 5 /* Enable display of drop-down menus in navigation on hover -- accessibility feature */ 6 $('.nav-item.dropdown').hover(function() { 7 $('.dropdown-toggle, .dropdown-menu', this).addClass('show'); 8 }, function() { 9 $('.dropdown-toggle, .dropdown-menu', this).removeClass('show'); 10 }); 11 12 /* Sticky header */ 13 if ($('header').hasClass('sticky')) { 14 let lastScrollTop = 0; 15 const header = $('header'); 16 const headerHeight = header.outerHeight(); 17 18 $(window).scroll(function() { 19 const scrollTop = $(this).scrollTop(); 20 21 if (scrollTop > lastScrollTop) { 22 // Scrolling down 23 if (scrollTop > headerHeight + 15) { 24 header.css({ top: -headerHeight + 'px' }); 25 setTimeout(() => { 26 header.addClass('stuck'); 27 }, 100); 28 } 29 } else { 30 // Scrolling up 31 if (scrollTop < headerHeight) { 32 header.removeClass('stuck').css({ top: '' }); 33 } 34 } 35 lastScrollTop = scrollTop; 36 }); 37 } 38 39 $('a[href^="#"]').on('click', function(e) { 40 e.preventDefault(); 41 42 var headerHeight = $('header').outerHeight(); 43 var target = $(this.getAttribute('href')); 44 var targetPosition = target.offset().top - headerHeight; 45 $('html, body').animate({ 46 scrollTop: targetPosition 47 }, 600); 48 console.warn('here'); 49 }); 50 51 $('.superblockslider-adaptive-height').each(function() { 52 var slider = $(this); 53 var sliderInitHeight = slider.outerHeight(); 54 slider.css('height', '1000px'); 55 var maxHeight = 0; 56 57 $('.superblockslider__slide_inner .inner-blocks', slider).each(function() { 58 if ($(this).outerHeight() > maxHeight) { 59 maxHeight = $(this).outerHeight(); 60 } 61 }); 62 63 console.error(sliderInitHeight); 64 65 slider.css('height', (maxHeight + 128) + 'px'); 66 }); 67 68 $('.ejtn--accordion').each(function() { 69 var accordion = $(this); 70 $('.ejtn--accordion--item > :is(h1, h2, h3, h4, h5, h6)', accordion).click(function(event) { 71 var item = $(this).closest('.ejtn--accordion--item'); 72 var content = item.children('.wp-block-group'); 73 74 $('.active', accordion).not(item).removeClass('active'); 75 $('.ejtn--accordion--item > .wp-block-group', accordion).not(content).slideUp(); 76 77 item.toggleClass('active'); 78 content.stop(false, true).slideToggle(); 79 80 event.preventDefault(); 81 }); 82 }); 83 84 $('a[href]').each(function() { 85 var link = $(this).attr('href'); 86 if (link.startsWith('http') && !link.includes(window.location.hostname)) { 87 $(this).attr({ 88 target: '_blank', 89 rel: 'noreferrer noopener' 90 }); 91 } 92 }); 93});
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.