1(function ($) { 2 "use strict"; 3 $(document).ready(function () { 4 5 if ($.fn.niceSelect) { 6 $('select').niceSelect(); 7 } 8 9 $('select').niceSelect(); 10 11 12 $('#wp-calendar td a').parent('td').addClass('has-calendar-link'); 13 $('.techza-header-area.sticky-header').wrap('<div class="sticky-wrapper"></div>'); 14 var headerHeight = $('.sticky-wrapper').height(), 15 stickyWrapper = $('.sticky-wrapper'); 16 stickyWrapper.css('height', headerHeight + "px") 17 window.onscroll = function () { 18 scrollFunction() 19 }; 20 21 function scrollFunction() { 22 if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { 23 stickyWrapper.addClass("is-sticky"); 24 } else { 25 stickyWrapper.removeClass("is-sticky"); 26 } 27 if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 300) { 28 $(".is-sticky .sticky-header").addClass("reveal-header"); 29 } else { 30 $(".is-sticky .sticky-header").removeClass("reveal-header"); 31 } 32 } 33 // comment load more button click event 34 $('.techza-comment-loadmore-btn').on('click', function () { 35 var button = $(this); 36 // decrease the current comment page value 37 techza_comment_loadmore.cpage--; 38 $.ajax({ 39 url: techza_comment_loadmore.ajaxurl, // AJAX handler, declared before 40 data: { 41 'action': 'cloadmore', // wp_ajax_cloadmore 42 'post_id': techza_comment_loadmore.parent_post_id, // the current post 43 'cpage': techza_comment_loadmore.cpage, // current comment page 44 }, 45 type: 'POST', 46 beforeSend: function (xhr) { 47 button.text('Loading...'); // preloader here 48 }, 49 success: function (data) { 50 if (data) { 51 $('ol.comment-list').append(data); 52 button.text('More comments'); 53 // if the last page, remove the button 54 if (techza_comment_loadmore.cpage == 1) 55 button.remove(); 56 } else { 57 button.remove(); 58 } 59 } 60 }); 61 return false; 62 }); 63 64 var $temp = $("<input>"); 65 var $url = $(location).attr('href'); 66 $('#copy-btn').on('click', function () { 67 68 $("body").append($temp); 69 $temp.val($url).select(); 70 document.execCommand("copy"); 71 alert('URL copied!'); 72 $temp.remove(); 73 $("p").text("URL copied!"); 74 75 }); 76 77 78 }) 79 $(window).load(function () { 80 if ($.fn.masonry) { 81 $('.blog-content-row .posts-row').masonry({ 82 // options 83 itemSelector: '.posts-row>div', 84 }); 85 } 86 setTimeout(function () { 87 jQuery(".techza-preloader-wrap").fadeOut(500); 88 }, 500); 89 setTimeout(function () { 90 jQuery(".techza-preloader-wrap").remove(); 91 }, 2000); 92 93 if ('object' != typeof (elementorFrontend)) { 94 95 96 $('.main-navigation ul.navbar-nav>li').each(function (i, v) { 97 $(v).find('a').contents().wrap('<span class="menu-item-text"/>') 98 }); 99 $(".menu-item-has-children > a").append('<span class="dropdownToggle"><i class="fas fa-angle-down"></i></span>'); 100 101 if (jQuery('.techza-main-menu-wrap').hasClass('menu-style-inline')) { 102 if (jQuery(window).width() < 1100) { 103 jQuery('.techza-main-menu-wrap').addClass('menu-style-flyout'); 104 } else { 105 jQuery('.techza-main-menu-wrap').removeClass('menu-style-flyout'); 106 } 107 108 $(window).resize(function () { 109 if (jQuery(window).width() < 1200) { 110 jQuery('.techza-main-menu-wrap').addClass('menu-style-flyout'); 111 } else { 112 jQuery('.techza-main-menu-wrap').removeClass('menu-style-flyout'); 113 } 114 }) 115 } 116 117 118 function navMenu() { 119 // main menu toggleer icon (Mobile site only) 120 $('[data-toggle="navbarToggler"]').on("click", function (e) { 121 $('.navbar').toggleClass('active'); 122 $('.navbar-toggler-icon').toggleClass('active'); 123 $('body').toggleClass('offcanvas--open'); 124 e.stopPropagation(); 125 e.preventDefault(); 126 127 }); 128 $('.navbar-inner').on("click", function (e) { 129 e.stopPropagation(); 130 }); 131 132 // Remove class when click on body 133 $('body').on("click", function () { 134 $('.navbar').removeClass('active'); 135 $('.navbar-toggler-icon').removeClass('active'); 136 $('body').removeClass('offcanvas--open'); 137 }); 138 $('.main-navigation ul.navbar-nav li.menu-item-has-children>a').on("click", function (e) { 139 e.preventDefault(); 140 $(this).siblings('.sub-menu').toggle(); 141 $(this).parent('li').toggleClass('dropdown-active'); 142 }) 143 $(".techza-mega-menu> ul.sub-menu > li > a").unbind('click'); // Navbar moved up 144 } 145 146 navMenu(); 147 148 } 149 }) 150 151 152}
152)(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.