1;(function($) { 2 // Strict Mode 3 'use strict'; 4 5 6 $(document).ready(function () { 7 8 9 $('.domain_box_info form').on('submit', function (){ 10 var formData = ''; 11 jQuery.ajax({ 12 type: "get", 13 dataType: "json", 14 url: local_strings.ajax_url, 15 data: {action:'my_action', fromdata: formData}, 16 success: function(msg){ 17 console.log(msg); 18 } 19 }); 20 return false; 21 22 }); 23 24 // back to top - start 25 $(window).scroll(function() { 26 if ($(this).scrollTop() > 200) { 27 $('#backtotop:hidden').stop(true, true).fadeIn(); 28 } else { 29 $('#backtotop').stop(true, true).fadeOut(); 30 } 31 }); 32 $(function() { 33 $("#scroll").on('click', function() { 34 $("html,body").animate({ 35 scrollTop: $("#thetop").offset().top 36 }, "slow"); 37 return false 38 }) 39 }); 40 41 // background image - start 42 // -------------------------------------------------- 43 $('[data-background]').each(function() { 44 $(this).css('background-image', 'url('+ $(this).attr('data-background') + ')'); 45 }); 46 47 // sticky header - start 48 $(window).on('scroll', function () { 49 if ($(this).scrollTop() > 120) { 50 $('.sticky_header').addClass("stuck"); 51 } else { 52 $('.sticky_header').removeClass("stuck"); 53 } 54 }); 55 56 57 // magnific popup - start 58 $('.popup_video').magnificPopup({ 59 type: 'iframe', 60 preloader: false, 61 removalDelay: 160, 62 fixedContentPos: false, 63 mainClass: 'mfp-with-zoom mfp-img-mobile' 64 }); 65 66 67 // details images carousel - start 68 $('#details_images_carousel').owlCarousel({ 69 items:1, 70 nav:true, 71 loop:true, 72 margin:15, 73 dots:false, 74 smartSpeed:1000 75 }); 76 77 // shop carousel - start 78 // -------------------------------------------------- 79 $('#shop_carousel').owlCarousel({ 80 nav: true, 81 margin: 30, 82 loop: true, 83 dots: false, 84 smartSpeed: 1000, 85 responsive: { 86 0: { 87 items: 1 88 }, 89 580: { 90 items: 2 91 }, 92 767: { 93 items: 3 94 }, 95 991: { 96 items: 3 97 }, 98 1000: { 99 items: 4 100 }, 101 1560: { 102 items: 4 103 }, 104 1920: { 105 items: 4 106 } 107 } 108 }); 109 // shop carousel - end 110 111 112 // cart quantity - start 113 $('.item_increase').on('click', function () { 114 var getID = $(this).next().attr('id'); 115 var result = document.getElementById(getID); 116 var qty = result.value; 117 $('.quantity_input').removeAttr('disabled'); 118 if (!isNaN(qty)) { 119 result.value++; 120 } else { 121 return false; 122 } 123 124 var qty = $( this ).parents('.product_quantity').find('.qty'); 125 qty.trigger( 'change' ); 126 127 }); 128 $('.item_decrease').on('click', function () { 129 var getID = $(this).prev().attr('id'); 130 var result = document.getElementById(getID); 131 var qty = result.value; 132 $('.quantity_input').removeAttr('disabled'); 133 if (!isNaN(qty) && qty > 0) { 134 result.value--; 135 } else { 136 return false; 137 } 138 139 var qty = $( this ).parents('.product_quantity').find('.qty'); 140 qty.trigger( 'change' ); 141 142 }); 143 144 // cart quantity - end 145 146 // menu button - start 147 // -------------------------------------------------- 148 $(document).ready(function () { 149 $('.close_btn, .overlay').on('click', function () { 150 $('#mobile_menu').removeClass('active'); 151 $('.overlay').removeClass('active'); 152 }); 153 154 $('.menu_btn').on('click', function () { 155 $('#mobile_menu').addClass('active'); 156 $('.overlay').addClass('active'); 157 }); 158 }); 159 160 $('.mobile_menu .dropdown').on('show.bs.dropdown', function (e) { 161 $(this).find('.dropdown-menu').first().stop(true, true).slideDown(400); 162 }); 163 $('.mobile_menu .dropdown').on('hide.bs.dropdown', function (e) { 164 $(this).find('.dropdown-menu').first().stop(true, true).slide
164Up(500); 165 }); 166 // menu button - end 167 168 169 170 //$('.dropdown > a').addClass('dropdown-toggle'); 171 $('.dropdown-menu .dropdown > a').on('click', function (e) { 172 if (!$(this).next().hasClass('show')) { 173 $(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); 174 } 175 var $subMenu = $(this).next(".dropdown-menu"); 176 $subMenu.toggleClass('show'); 177 $(this).parents('li.dropdown.show').on('.dropdown', function (e) { 178 $('.dropdown-menu > .dropdown .show').removeClass("show"); 179 }); 180 $('.dropdown-menu li a.dropdown-toggle').removeClass("show_dropdown"); 181 if ($(this).next().hasClass('show')) { 182 $(this).addClass("show_dropdown"); 183 } 184 return false; 185 }); 186 // for wp side menu - end 187 // -------------------------------------------------- 188 189 190 // -------------------------------------------------- 191 $(window).on("load", function () { 192 if ($(".mega_menu_two .scroll").length) { 193 $(".mega_menu_two .scroll").mCustomScrollbar({ 194 mouseWheelPixels: 50, 195 scrollInertia: 0, 196 }); 197 } 198 }); 199 200 201 $('.menu_btn').on('click', function (event) { 202 $('.main_menu').slideToggle(400); 203 if($(this).hasClass('open')){ 204 $(this).removeClass('open'); 205 }else { 206 $(this).addClass('open'); 207 } 208 }); 209 210 function active_dropdown() { 211 if ($(window).width() < 992) { 212 $('.main_menu li.menu_item_has_child > a').on('click', function (event) { 213 event.preventDefault() 214 $(this).parent().find('ul').first().slideToggle(700); 215 $(this).parent().siblings().find('ul').hide(700); 216 }); 217 } 218 } 219 active_dropdown(); 220 221 // Item Mega Menu 222 $('.main_menu .mega_menu:not(.mega_menu_two) > .submenu').wrap('<div class="submenu mega_menu_inner"></div>'); 223 $('.mega_menu:not(.mega_menu_two) .submenu.mega_menu_inner .submenu').addClass('dropdown-menu').removeClass('submenu'); 224 $('.main_menu .mega_menu .mega_menu_inner .dropdown-menu li > a').addClass('nav-link'); 225 226 227 if ($('.search-btn').length) { 228 $('.search-btn').on('click', function () { 229 $('body').addClass('open'); 230 setTimeout(function () { 231 $('.search-input').focus(); 232 }, 500); 233 return false; 234 }); 235 $('.close_icon').on('click', function () { 236 $('body').removeClass('open'); 237 return false; 238 }); 239 } 240 241 // Mobile menu background color option 242 $(window).resize(function () { 243 var widthWindow = $(window).width(); 244 if (widthWindow <= '991') { 245 $('.header_section').addClass('mobile_menu_open'); 246 } 247 else 248 { 249 $('.header_section').removeClass('mobile_menu_open'); 250 } 251 }); 252 $(window).trigger('resize'); 253 254 // Remove Hash link Menu 255 $('.main_menu li a').each(function (){ 256 if($(this).attr('href') === '#') { 257 $(this).attr('href', "javascript:void(0)"); 258 return false; 259 } 260 }); 261 262 }); 263 264})(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.