1$(document).ready(function () { 2 setInitialLogoSize(); 3 setMenuFontSizes(); 4 handleScrollEvent(); 5}); 6 7$('#hamburger_menu').click(function () { 8 $('nav').slideToggle(); 9}); 10 11$('nav > ul.main-nav-bar > li').click(function () { 12 $(this).children('ul.sub-menu').slideToggle(); 13}); 14 15function handleScrollEvent() { 16 window.onscroll = function () { 17 scrollFunction(); 18 }; 19 20 scrollFunction(); 21} 22 23function setInitialLogoSize() { 24 var logoMinWidth = themeOptions.logoMinWidth || 150; // Fallback auf 150px, falls NULL 25 var logoMaxWidth = themeOptions.logoMaxWidth || 150; 26 27 if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { 28 // Wenn bereits gescrollt wurde 29 if (window.innerWidth > 1139) { 30 $('header').css('marginTop', '0'); 31 $('.logo img').css('width', logoMinWidth + 'px'); 32 $('.logo').css('padding', '15px 0px'); 33 } 34 } else { 35 // Initialer Zustand 36 if (window.innerWidth > 1139) { 37 $('header').css('marginTop', '60px'); 38 $('.logo img').css('width', logoMaxWidth + 'px'); 39 $('.logo').css('padding', '30px 0px'); 40 } 41 } 42} 43 44function setMenuFontSizes() { 45 var menuSize = themeOptions.menuSize || 15; // Fallback auf 15px, falls NULL 46 var submenuSize = themeOptions.submenuSize || 14; // Fallback auf 14px, falls NULL 47 48 $('.main-nav-bar > li > a').css('font-size', menuSize + 'px'); 49 $('.main-nav-bar ul.sub-menu a').css('font-size', submenuSize + 'px'); 50} 51 52function scrollFunction() { 53 var logoMinWidth = themeOptions.logoMinWidth || 150; // Fallback auf 150px, falls NULL 54 var logoMaxWidth = themeOptions.logoMaxWidth || 150; 55 56 if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { 57 $('#go_to_top').css('display', 'block'); 58 if (window.innerWidth > 1139) { 59 $('header').css('marginTop', '0'); 60 $('.logo img').css('width', logoMinWidth + 'px'); 61 $('.logo').css('padding', '15px 0px'); 62 } 63 } else { 64 $('#go_to_top').css('display', 'none'); 65 if (window.innerWidth > 1139) { 66 $('header').css('marginTop', '60px'); 67 $('.logo img').css('width', logoMaxWidth + 'px'); 68 $('.logo').css('padding', '30px 0px'); 69 } 70 } 71} 72 73function gotoTop() { 74 document.body.scrollTop = 0; 75 document.documentElement.scrollTop = 0; 76}
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.