1/*-------------------------------------------------------------- 2>>> TABLE OF CONTENTS: 3---------------------------------------------------------------- 41. Header 52. Theme 6--------------------------------------------------------------*/ 7 8 9/*-------------------------------------------------------------- 101. Header 11--------------------------------------------------------------*/ 12 13 14jQuery(document).ready(function ($) { 15 16 17 // Data attribute to hide offcanvas and enable body scroll on resize through the breakpoints 18 $(window).on('resize', function () { 19 $('[data-bs-hideresize="true"]').offcanvas('hide'); 20 }); 21 22 23 // Close offcanvas on click a, keep .dropdown-menu open 24 $('.offcanvas a:not(.dropdown-toggle):not(a.remove_from_cart_button), a.dropdown-item').on('click', function () { 25 $('.offcanvas').offcanvas('hide'); 26 }); 27 28 29 // Dropdown menu animation 30 // Add slideDown animation to Bootstrap dropdown when expanding. 31 $('.dropdown').on('show.bs.dropdown', function () { 32 $(this).find('.dropdown-menu').first().stop(true, true).slideDown(); 33 }); 34 35 // Add slideUp animation to Bootstrap dropdown when collapsing. 36 $('.dropdown').on('hide.bs.dropdown', function () { 37 $(this).find('.dropdown-menu').first().stop(true, true).slideUp(); 38 }); 39 40 41 // Mobile search button hide if empty 42 if ($('.searchform').length != 1) { 43 $('.top-nav-search-md, .top-nav-search-lg').addClass('hide'); 44 } 45 if ($('.searchform').length != 0) { 46 $('.top-nav-search-md, .top-nav-search-lg').removeClass('hide'); 47 } 48 49 50 // Set parent nav-link active if blog post or shop item is open 51 $('.current-post-ancestor .nav-link').addClass('active'); 52 $('.current_page_parent .nav-link').addClass('active'); 53 54 55}); // jQuery End 56 57 58 59 60/*-------------------------------------------------------------- 612. Theme 62--------------------------------------------------------------*/ 63 64jQuery(document).ready(function ($) { 65 66 67 // Smooth Scroll 68 $(function () { 69 $('a[href*="#"]:not([href="#"]):not(a.comment-reply-link):not([href="#tab-reviews"]):not([href="#tab-additional_information"]):not([href="#tab-description"]):not([href="#reviews"]):not([href="#carouselExampleIndicators"]):not([data-smoothscroll="false"])').click(function () { 70 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 71 var target = $(this.hash); 72 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 73 if (target.length) { 74 $('html, body').animate({ 75 // Change your offset according to your navbar height 76 scrollTop: target.offset().top - 55 77 }, 1000); 78 return !1 79 } 80 } 81 }) 82 }); 83 84 85 // Scroll to ID from external url 86 if (window.location.hash) scroll(0, 0); 87 setTimeout(function () { 88 scroll(0, 0) 89 }, 1); 90 $(function () { 91 $('.scroll').on('click', function (e) { 92 e.preventDefault(); 93 $('html, body').animate({ 94 // Change your offset according to your navbar height 95 scrollTop: $($(this).attr('href')).offset().top - 55 96 }, 1000, 'swing') 97 }); 98 if (window.location.hash) { 99 $('html, body').animate({ 100 // Change your offset according to your navbar height 101 scrollTop: $(window.location.hash).offset().top - 55 102 }, 1000, 'swing') 103 } 104 }); 105 106 107 // Scroll to top Button 108 $(window).scroll(function () { 109 var scroll = $(window).scrollTop(); 110 111 if (scroll >= 500) { 112 $(".top-button").addClass("visible"); 113 } else { 114 $(".top-button").removeClass("visible"); 115 } 116 }); 117 118 119 // div height, add class to your content 120 $(".height-50").css("height", 0.5 * $(window).height()); 121 $(".height-75").css("height", 0.75 * $(window).height()); 122 $(".height-85").css("height", 0.85 * $(window).height()); 123 $(".height-100").css("height", 1.0 * $(window).height()); 124 125 126 // Forms 127 $('select, #billing_state').addClass('form-select'); 128 129 130 // Alert links 131 $('.alert a').addClass('alert-link'); 132 133 134}); // jQuery End
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.