1(function () { 2 3 var UP_ARROW_CLASS = "footer--up-arrow" 4 5 var LIST_HEIGHT = 40 6 7 var FOOTER_HEIGHT = 0; 8 9 function showList(ulElem, button) { 10 var maxHeight = $(ulElem).children().length * LIST_HEIGHT; 11 var hasFooterUpClass = $('.footer__list').find('.footer--up-arrow'); 12 13 if (hasFooterUpClass.length) { 14 $('.footer--up-arrow').parent().parent().find("ul").css("max-height", "0px"); 15 $('.footer__list').find('.footer--up-arrow').toggleClass(UP_ARROW_CLASS); 16 } 17 18 calculateHeight(FOOTER_HEIGHT + (maxHeight - 20) + 'px'); 19 $(ulElem).css("max-height", maxHeight + "px", false) 20 $(button).toggleClass(UP_ARROW_CLASS); 21 } 22 23 function hideList(ulElem, button) { 24 calculateHeight(FOOTER_HEIGHT + 'px', false); 25 $(ulElem).css("max-height", "0px") 26 $(button).toggleClass(UP_ARROW_CLASS); 27 } 28 29 function calculateHeight(height, initial = true) { 30 $('.footer').parent().css({ 31 "transition": `padding-bottom ${initial ? '0s' : '0.5s'} linear`, 32 "padding-bottom": height, 33 }); 34 } 35 36 $(window).on("load", function () { 37 FOOTER_HEIGHT = $('footer').height(); 38 calculateHeight(FOOTER_HEIGHT + 'px'); 39 $(".footer__nav-bar").each(function () { 40 $(this).find(".footer__drop-down").each(function () { 41 $(this).on("click", function () { 42 var ulElem = $(this).parent().parent().find("ul") 43 if (!$(this).hasClass(UP_ARROW_CLASS)) { 44 showList(ulElem, this) 45 } else hideList(ulElem, this) 46 }) 47 }) 48 }) 49 50 $(window).resize(function () { 51 FOOTER_HEIGHT = $('footer').height(); 52 calculateHeight(FOOTER_HEIGHT + 'px'); 53 }); 54 }) 55 56 $(document).ready(function () { 57 calculateHeight($('footer').height() + 'px'); 58 document.addEventListener('readystatechange', (event) => { 59 calculateHeight($('footer').height() + 'px'); 60 }); 61 }); 62})()
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.