1var footerDate = document.getElementById('footerDate'); 2var d = new Date().getFullYear(); 3footerDate.innerHTML = d; 4 5(function ($) { 6 /***************************** 7 * Show phone icon on mobile 8 /*****************************/ 9 10 setTimeout(function () { 11 $('.phone-cta').addClass('show-phone-cta'); 12 }, 2000); 13 14 /***************************** 15 * Cookie agreement popup 16 /*****************************/ 17 18 // Set cookie to var 19 var cookieAgreementCookie = Cookies.get('cookiepopup'); 20 21 // If cookie has not been set show popup 22 if (!cookieAgreementCookie) { 23 setTimeout(function () { 24 $('.cookie-popup').addClass('cookie-popup-show'); 25 }, 5000); 26 } 27 28 // If cookie agree button has been clicked, hide popup and set cookie 29 $('.cookie-agree').click(function () { 30 $('.cookie-popup').removeClass('cookie-popup-show'); 31 Cookies.set('cookiepopup', 'true', {expires: 7}); 32 }); 33 34 /***************************** 35 * Woocommerce popup 36 /*****************************/ 37 38 $('.woocommerce .sm-product-container .qv-btn').click(function () { 39 $(this) 40 .closest('li.product') 41 .find('.product-popup') 42 .addClass('product-popup-show'); 43 }); 44 45 $('.sm-popup-close').click(function () { 46 $(this) 47 .closest('li.product') 48 .find('.product-popup') 49 .removeClass('product-popup-show'); 50 }); 51 52 /***************************** 53 * Scroll to top button 54 /*****************************/ 55 56 var scrollTopButton = $('.scroll-top'); 57 58 $(window).scroll(function () { 59 var scrollTop = $(window).scrollTop(); 60 var elementOffset = $('#page-container').offset().top; 61 var currentElementOffset = scrollTop - elementOffset; 62 if (currentElementOffset > 500) { 63 scrollTopButton.addClass('show-scroll-to-top'); 64 } else { 65 scrollTopButton.removeClass('show-scroll-to-top'); 66 } 67 }); 68 69 /***************************** 70 * Mobile menu 71 /*****************************/ 72 73 function setup_collapsible_submenus() { 74 $("<div class='sub-menu-toggle'></div>").insertBefore( 75 '#main-header #mobile_menu.et_mobile_menu .menu-item-has-children > a' 76 ); 77 $('#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle').click( 78 function () { 79 $(this).toggleClass('popped'); 80 } 81 ); 82 } 83 $(document).ready(function () { 84 setup_collapsible_submenus(); 85 }); 86 87})(jQuery);
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.