1$(document).ready(function () { 2 //header-fix 3 $(window).on('scroll', function (event) { 4 headerAffix(); 5 }); 6 7 function headerAffix() { 8 var scrollValue = $(window).scrollTop(); 9 if (scrollValue > $('.header').height()) { 10 $('.header').addClass('fixed-top'); 11 } else { 12 $('.header').removeClass('fixed-top'); 13 } 14 } 15 headerAffix(); 16 17 //Mobile sidebar 18 function navSidebar() { 19 var $sideElement = $('#navbarSupportedContent'); 20 var $sideParent = $('header'); 21 var $swiper = $('.wrapper'); 22 var $body = $('body'); 23 $sideElement.on('hidden.bs.collapse', function () { 24 $sideParent.find('.sidebar-overlay').remove(); 25 $body.removeClass('scroll-hide'); 26 }); 27 $sideElement.on('show.bs.collapse', function () { 28 $sideParent.append('<div class="sidebar-overlay" />'); 29 $body.addClass('scroll-hide'); 30 }); 31 $sideParent.on("click", ".sidebar-overlay", function () { 32 $sideElement.collapse('hide'); 33 }); 34 $(window).on('scroll', function() { 35 if ($(window).scrollTop() > 100) { 36 $body.addClass('scrolled'); 37 } else { 38 $body.removeClass('scrolled'); 39 } 40 }); 41 } 42 navSidebar(); 43}); 44 45 46// Main content margin top 47 48$(document).ready(function () { 49 // Function to update margin-top based on header height 50 function updateMarginTop() { 51 var headerHeight = $('.header-inner').outerHeight(); 52 $('.content-main').css('margin-top', headerHeight + 'px'); 53 } 54 55 // Initial update on document ready 56 updateMarginTop(); 57 58 // Update on window resize 59 $(window).on('resize', function () { 60 updateMarginTop(); 61 }); 62 63 // Update on window load (in case images affect layout) 64 $(window).on('load', function () { 65 updateMarginTop(); 66 }); 67 68 // Update on window scroll (if necessary) 69 $(window).on('scroll', function () {}); 70 71 72 // // Initialize intl-tel-input 73 // $("#mobile_code").intlTelInput({ 74 // initialCountry: "gb", 75 // separateDialCode: true, 76 // }); 77}); 78
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.