1;(function ($) { 2 "use strict"; 3 4 $(document).ready(function () { 5 6 // Add job apply form class 7 $('.page-job-apply .wpcf7-form').addClass('row'); 8 9 // Apply pull quote color 10 let pullquote_color = $('.wp-block-pullquote').attr('style'); 11 $('.wp-block-pullquote blockquote').attr('style', pullquote_color); 12 13 $('.tinv-wraper.tinv-wishlist a.tinvwl_add_to_wishlist_button').append('<i class="ti-heart"></i>'); 14 15 // Manage hash link prevent default 16 function hashLinkprevendDefault() { 17 18 let link = $('.menu li> a'); 19 20 link.on('click', function() { 21 22 let urlHash = $(this).attr('href').split('/'); 23 24 if(urlHash[urlHash.length - 1] === '#') { 25 return false; 26 } 27 28 }); 29 30 } 31 32 hashLinkprevendDefault(); 33 34 function mobileMenudropdown(x) { 35 36 if (x.matches) { // If media query matches 37 $('.menu > li.submenu > a').click(function (event) { 38 if( $(this).siblings().length){ 39 event.preventDefault() 40 $(this).parent().find('ul').first().toggle(700); 41 $(this).parent().siblings().find('ul').hide(700); 42 } 43 }); 44 } 45 46 } 47 48 var x = window.matchMedia("(max-width: 767px)"); 49 mobileMenudropdown(x); 50 51 // Attach listener function on state changes 52 x.addEventListener("change", () => { 53 54 mobileMenudropdown() 55 56 }); 57 58 59 $('.navbar-nav .mega_menu>.dropdown-menu').wrap('<div class="mega_menu_inner"></div>'); 60 61 if ($('.comment_box .children').length > 0) { 62 $('.comment_box .children').addClass('list-unstyled reply_comment').removeClass('children'); 63 $('.reply_comment .post_comment').removeClass('post_comment'); 64 } 65 66 $('.widget_products').addClass('widget_product'); 67 $('.widget_top_rated_products').addClass('widget_product'); 68 $('.widget_recently_viewed_products').addClass('widget_product'); 69 $('.widget_products ul.product_list_widget').addClass('list-unstyled'); 70 $('.widget_product_search').addClass('search_widget_two'); 71 $('.widget_product_categories ').addClass('widget_category'); 72 73 $('.footer-widget:first-child .f_widget').removeClass('pl_70 '); 74 75 /*------------- preloader js --------------*/ 76 function loader() { 77 $(window).on('load', function () { 78 $('#ctn-preloader').addClass('loaded'); 79 // Una vez haya terminado el preloader aparezca el scroll 80 81 if ($('#ctn-preloader').hasClass('loaded')) { 82 // Es para que una vez que se haya ido el preloader se elimine toda la seccion preloader 83 $('#preloader').delay(900).queue(function () { 84 $(this).remove(); 85 }); 86 } 87 }); 88 } 89 90 loader(); 91 92 //* Navbar Fixed 93 function navbarFixed() { 94 if ($('.header_stick').length) { 95 $(window).scroll(function () { 96 var scroll = $(window).scrollTop(); 97 if (scroll) { 98 $(".header_stick").addClass("navbar_fixed"); 99 } else { 100 $(".header_stick").removeClass("navbar_fixed"); 101 } 102 }); 103 } 104 } 105 106 navbarFixed(); 107 108 if ($('.search-btn').length) { 109 $('.search-btn').on('click', function () { 110 $('body').addClass('open'); 111 setTimeout(function () { 112 $('.search-input').focus(); 113 }, 500); 114 return false; 115 }); 116 $('.close_icon').on('click', function () { 117 $('body').removeClass('open'); 118 return false; 119 }); 120 } 121 122 // hamburger_menu 123 function offcanvasActivator() { 124 if ($('.bar_menu').length) { 125 $('.bar_menu').on('click', function () { 126 $('#menu').toggleClass('show-menu'); 127 }); 128 $('.close_icon').on('click', function () { 129 $('#menu').removeClass('show-menu'); 130 }); 131 } 132 } 133 134 offcanvasActivator(); 135 136 $('.offcanfas_menu .dropdown').on('show.bs.dropdown', function (e) { 137 $(this).find('.dropdown-menu').first().stop(true, true).slideDown(400); 138 }); 139 $('.offcanfas_menu .dropdown').on('hide.bs.dropdown', function (e) { 140 $(this).find('.dropdown-menu').first().stop(true, true).slide
140Up(500); 141 }); 142 143 $(window).on("load", function () { 144 if ($('.mega_menu_two .scroll').length) { 145 $(".mega_menu_two .scroll").mCustomScrollbar({ 146 mouseWheelPixels: 50, 147 scrollInertia: 0, 148 }); 149 } 150 }); 151 152 // Update cart button 153 $('.ar_top').on('click', function () { 154 var getID = $(this).next().attr('id'); 155 var result = document.getElementById(getID); 156 var qty = result.value; 157 $('.shopping_cart_area .cart_btn.cart_btn_two').removeAttr('disabled'); 158 if (!isNaN(qty)) { 159 result.value++; 160 $('.cart_btn.ajax_add_to_cart').attr('data-quantity', result.value ) 161 } else { 162 return false; 163 } 164 }); 165 166 $('.ar_down').on('click', function () { 167 var getID = $(this).prev().attr('id'); 168 var result = document.getElementById(getID); 169 var qty = result.value; 170 $('.shopping_cart_area .cart_btn.cart_btn_two').removeAttr('disabled'); 171 if (!isNaN(qty) && qty > 0) { 172 result.value--; 173 $('.cart_btn.ajax_add_to_cart').attr('data-quantity', result.value ) 174 } else { 175 return false; 176 } 177 }); 178 }); 179 180 var wincow_width = $( window ).width(); 181 if( 992 > wincow_width ){ 182 $('.header_area').addClass('mobile_menu_enabled'); 183 } 184 185})(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.