PageSourceSearch

https://handieasy.com/themes/woodlayout1/assets/js/custom.js

js handieasy.com collected 2026-10-04 11:24:28 UTC 16,695 bytes, 519 lines download raw bytes

1/*! Customized Jquery from Pushpendu Paul. [email protected]  : www.thementic.com
2Authors & copyright (c) 2022: Thementic Web Service. */
3// Template Start
4$(document).ready(function () {
5
6	bindGrid();
7 
8	var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
9	if (!isMobile) {
10	   if ($(".parallax").length) {
11		  $(".parallax").sitManParallex({
12			 invert: false
13		  });
14	   };
15	} else {
16	   $(".parallax").sitManParallex({
17		  invert: true
18	   });
19	}
20 
21	$('.cart_block .block_content').on('click', function (event) {
22	   event.stopPropagation();
23	});
24 
25 
26	// ---------------- home page blog slider setting ----------------------
27	var psblog = $("#blog-carousel");
28	psblog.owlCarousel({
29	   items: 3, //10 items above 1000px browser width
30	   itemsDesktop: [1299, 3],
31	   itemsDesktopSmall: [991, 2],
32	   itemsTablet: [544, 1],
33	   itemsMobile: [479, 1],
34	   autoPlay: false,
35	   pagination: false,
36	   navigation: true,
37	   slideSpeed: 1500,
38	   rewindSpeed: 1000
39	});
40	// Custom Navigation Events
41	$(".blog_next").click(function () {
42	   psblog.trigger('owl.next');
43	})
44	$(".blog_prev").click(function () {
45	   psblog.trigger('owl.prev');
46	});
47 
48 
49	// ---------------- start more menu setting ----------------------
50	if (jQuery(window).width() >= 1300) {
51		var max_elem = 8;
52		var items = $('.menu ul#top-menu > li');
53		var surplus = items.slice(max_elem, items.length);
54  
55		surplus.wrapAll('<li class="category more_menu" id="more_menu"><div id="top_moremenu" class="popover sub-menu js-sub-menu collapse"><ul class="top-menu more_sub_menu">');
56  
57		$('.menu ul#top-menu .more_menu').prepend('<a href="#" class="dropdown-item" data-depth="0"><span class="float-xs-right hidden-md-up"><span data-target="#top_moremenu" data-toggle="collapse" class="navbar-toggler collapse-icons"><i class="material-icons add">?</i><i class="material-icons remove">?</i></span></span></span>More</a>');
58  
59		$('.menu ul#top-menu .more_menu').mouseover(function () {
60			  $(this).children('div').css('display', 'block');
61		   })
62		   .mouseout(function () {
63			  $(this).children('div').css('display', 'none');
64		   });
65	 } else if ((jQuery(window).width() >= 992) && (jQuery(window).width() <= 1299)) {
66		var max_elem = 5;
67		var items = $('.menu ul#top-menu > li');
68		var surplus = items.slice(max_elem, items.length);
69  
70		surplus.wrapAll('<li class="category more_menu" id="more_menu"><div id="top_moremenu" class="popover sub-menu js-sub-menu collapse"><ul class="top-menu more_sub_menu">');
71  
72		$('.menu ul#top-menu .more_menu').prepend('<a href="#" class="dropdown-item" data-depth="0"><span class="float-xs-right hidden-md-up"><span data-target="#top_moremenu" data-toggle="collapse" class="navbar-toggler collapse-icons"><i class="material-icons add">?</i><i class="material-icons remove">?</i></span></span></span>More</a>');
73  
74		$('.menu ul#top-menu .more_menu').mouseover(function () {
75			  $(this).children('div').css('display', 'block');
76		   })
77		   .mouseout(function () {
78			  $(this).children('div').css('display', 'none');
79		   });
80	 }
81	 // ---------------- end more menu setting ---------------------- //
82 
83	// ---------------- start Advance more menu setting ----------------------
84 
85	if (jQuery(window).width() >= 1300) {
86	   var max_elem = 8;
87	   var items = $('.main-menu ul#menu > li');
88	   var surplus = items.slice(max_elem, items.length);
89 
90	   surplus.wrapAll('<li class="li-niveau1 category more_menu" id="more_menu"><div id="top_moremenu" class="adtm_sub"><ul id="menu" class="more_sub_menu">');
91 
92	   $('.main-menu ul#menu .more_menu').prepend('<a href="#" class="a-niveau1" data-depth="0"><span class="float-xs-right hidden-md-up"><span data-target="#top_moremenu" data-toggle="collapse" class="navbar-toggler collapse-icons"><i class="material-icons add"></i><i class="material-icons remove"></i></span></span></span><span class="advtm_menu_span">More</span></a>');
93 
94 
95	} else if ((jQuery(window).width() >= 1200) && (jQuery(window).width() <= 1299)) {
96	   var max_elem = 7;
97	   var items = $('.main-menu ul#menu > li');
98	   var surplus = items.slice(max_elem, items.length);
99 
100	   surplus.wrapAll('<li class="li-niveau1 category more_menu" id="more_menu"><div id="top_moremenu" class="adtm_sub"><ul id="menu" class="more_sub_menu">');
101 
102	   $('.main-menu ul#menu .more_menu').prepend('<a href="#" class="a-niveau1" data-depth="0"><span class="float-xs-right hidden-md-up"><span data-target="#top_moremenu" data-toggle="collapse" class="navbar-toggler collapse-icons"><i class="material-icons add"></i><i class="material-icons remove"></i></span></span></span><span class="advtm_menu_span">More</span></a>');
103 
104	} else if ((jQuery(window).width() >= 992) && (jQuery(window).width() <= 1199)) {
105	   var max_elem = 6;
106	   var items = $('.main-menu ul#menu > li');
107	   var surplus = items.slice(max_elem, items.length);
108 
109	   surplus.wrapAll('<li class="li-niveau1 category more_menu" id="more_menu"><div id="top_moremenu" class="adtm_sub"><ul id="menu" class="more_sub_menu">');
110 
111	   $('.main-menu ul#menu .more_menu').prepend('<a href="#" class="a-niveau1" data-depth="0"><span class="float-xs-right hidden-md-up"><span data-target="#top_moremenu" data-toggle="collapse" class="navbar-toggler collapse-icons"><i class="material-icons add"></i><i class="material-icons remove"></i></span></span></span><span class="advtm_menu_span">More</span></a>');
112 
113	}
114 
115	/*$('.main-menu ul#menu .more_menu').mouseover(function() {
116				 $(this).children('div').css('display', 'block');
117			 })
118			 .mouseout(function() {
119				 $(this).children('div').css('display', 'none');
120			 });*/
121 
122	// ---------------- end Advance more menu setting ----------------------
123 
124 
125 });
126 
127 
128 $(".products-section-title").wrap("<div class='title-wrapper'></div>");
129 $(".all-product-link").wrap("<div class='product-more'></div>");
130 
131 
132 $('.search_button').click(function (event) {
133	$(this).toggleClass('active');
134	event.stopPropagation();
135	$(".searchtoggle").slideToggle("fast");
136	$(".ui-autocomplete-input").focus();
137 });
138 $(".searchtoggle").on("click", function (event) {
139	event.stopPropagation();
140 });
141 
142 $('.header-top .pst_userinfotitle').click(function (event) {
143	$(this).toggleClass('active');
144	event.stopPropagation();
145	$(".user-info").slideToggle("fast");
146 });
147 $(".user-info").on("click", function (event) {
148	event.stopPropagation();
149 });
150 
151 // Add/Remove acttive class on menu active in responsive  
152 $('#menu-icon').on('click', function () {
153	$(this).toggleClass('active');
154 });
155 
156 
157 // Loading image before flex slider load
158 $(window).load(function () {
159	$(".loadingdiv").removeClass("spinner");
160 });
161 
162 // Flex slider load
163 $(window).load(function () {
164	if ($('.flexslider').length > 0) {
165	   $('.flexslider').flexslider({
166		  slideshowSpeed: $('.flexslider').data('interval'),
167		  pauseOnHover: $('.flexslider').data('pause'),
168		  animation: "fade"
169	   });
170	}
171 });
172 
173 // Scroll page bottom to top
174 $(window).scroll(function () {
175	if ($(this).scrollTop() > 500) {
176	   $('.top_button').fadeIn(500);
177	} else {
178	   $('.top_button').fadeOut(500);
179	}
180 });
181 $('.top_button').click(function (event) {
182	event.preventDefault();
183	$('html, body').animate({
184	   scrollTop: 0
185	}, 800);
186 });
187 
188 
189 /*======  Carousel Slider For Feature Product ==== */
190 
191 var pstfeature = $("#pstfeature-carousel");
192 pstfeature.owlCarousel({
193	items: 4, //10 items above 1000px browser width
194	itemsDesktop: [1299, 3],
195	itemsDesktopSmall: [991, 3],
196	itemsTablet: [767, 2],
197	itemsMobile: [479, 1],
198	pagination: false,
199	autoplay: true,
200	slideSpeed: 1500,
201	rewindSpeed: 1000
202 });
203 // Custom Navigation Events
204 $(".pstfeature_next").click(function () {
205	pstfeature.trigger('owl.next');
206 })
207 $(".pstfeature_prev").click(function () {
208	pstfeature.trigger('owl.prev');
209 });
210 
211 
212 /*======  Carousel Slider For New Product ==== */
213 
214 var pstnewproduct = $("#pstnewproduct-carousel");
215 pstnewproduct.owlCarousel({
216	items: 4, //10 items above 1000px browser width
217	itemsDesktop: [1299, 3],
218	itemsDesktopSmall: [991, 3],
219	itemsTablet: [767, 2],
220	itemsMobile: [479, 1],
221	pagination: false,
222	slideSpeed: 1500,
223	rewindSpeed: 1000
224 });
225 // Custom Navigation Events
226 $(".pstnewproduct_next").click(function () {
227	pstnewproduct.trigger('owl.next');
228 })
229 $(".pstnewproduct_prev").click(function () {
230	pstnewproduct.trigger('owl.prev');
231 });
232 
233 
234 /*======  Carousel Slider For Bestseller Product ==== */
235 
236 var pstbestseller = $("#pstbestseller-carousel");
237 pstbestseller.owlCarousel({
238	items: 4, //10 items above 1000px browser width
239	itemsDesktop: [1299, 3],
240	itemsDesktopSmall: [991, 3],
241	itemsTablet: [767, 2],
242	itemsMobile: [479, 1],
243	pagination: false,
244	slideSpeed: 1500,
245	rewindSpeed: 1000
246 });
247 // Custom Navigation Events
248 $(".pstbestseller_next").click(function () {
249	pstbestseller.trigger('owl.next');
250 })
251 $(".pstbestseller_prev").click(function () {
252	pstbestseller.trigger('owl.prev');
253 });
254 
255 /*======  Carousel Slider For Special Product ==== */
256 var pstspecial = $("#pstspecial-carousel");
257 pstspecial.owlCarousel({
258	items: 1, //10 items above 1000px browser width
259	itemsDesktop: [1299, 1],
260	itemsDesktopSmall: [991, 1],
261	itemsTablet: [767, 1],
262	itemsMobile: [479, 1],
263	singleItem: true,
264	pagination: false,
265	transitionStyle: "backSlide",
266	slideSpeed: 1500,
267	rewindSpeed: 1000
268 
269 });
270 // Custom Navigation Events
271 $(".pstspecial_next").click(function () {
272	pstspecial.trigger('owl.next');
273 })
274 $(".pstspecial_prev").click(function () {
275	pstspecial.trigger('owl.prev');
276 });
277 
278 /*======  Carousel Slider For Accessories Product ==== */
279 
280 var pstaccessories = $("#pstaccessories-carousel");
281 pstaccessories.owlCarousel({
282	items: 4, //10 items above 1000px browser width
283	itemsDesktop: [1299, 3],
284	itemsDesktopSmall: [991, 3],
285	itemsTablet: [767, 2],
286	itemsMobile: [479, 1],
287	pagination: false,
288	slideSpeed: 1500,
289	rewindSpeed: 1000
290 });
291 // Custom Navigation Events
292 $(".pstaccessories_next").click(function () {
293	pstaccessories.trigger('owl.next');
294 })
295 $(".pstaccessories_prev").click(function () {
296	pstaccessories.trigger('owl.prev');
297 });
298 
299 
300 /*======  Carousel Slider For Category Product ==== */
301 
302 var pstproductscategory = $("#pstproductscategory-carousel");
303 pstproductscategory.owlCarousel({
304	items: 4, //10 items above 1000px browser width
305	itemsDesktop: [1299, 3],
306	itemsDesktopSmall: [991, 3],
307	itemsTablet: [767, 2],
308	itemsMobile: [479, 1],
309	pagination: false,
310	slideSpeed: 1500,
311	rewindSpeed: 1000
312 });
313 // Custom Navigation Events
314 $(".pstproductscategory_next").click(function () {
315	pstproductscategory.trigger('owl.next');
316 })
317 $(".pstproductscategory_prev").click(function () {
318	pstproductscategory.trigger('owl.prev');
319 });
320 
321 
322 /*======  Carousel Slider For Viewed Product ==== */
323 
324 var pstviewed = $("#pstviewed-carousel");
325 pstviewed.owlCarousel({
326	items: 4, //10 items above 1000px browser width
327	itemsDesktop: [1299, 3],
328	itemsDesktopSmall: [991, 3],
329	itemsTablet: [767, 2],
330	itemsMobile: [479, 1],
331	pagination: false,
332	slideSpeed: 1500,
333	rewindSpeed: 1000
334 });
335 // Custom Navigation Events
336 $(".pstviewed_next").click(function () {
337	pstviewed.trigger('owl.next');
338 })
339 $(".pstviewed_prev").click(function () {
340	pstviewed.trigger('owl.prev');
341 });
342 
343 /*======  Carousel Slider For Crosssell Product ==== */
344 
345 var pstcrosssell = $("#pstcrosssell-carousel");
346 pstcrosssell.owlCarousel({
347	items: 4, //10 items above 1000px browser width
348	itemsDesktop: [1299, 3],
349	itemsDesktopSmall: [991, 3],
350	itemsTablet: [767, 2],
351	itemsMobile: [479, 1],
352	pagination: false,
353	slideSpeed: 1500,
354	rewindSpeed: 1000
355 });
356 // Custom Navigation Events
357 $(".pstcrosssell_next").click(function () {
358	pstcrosssell.trigger('owl.next');
359 })
360 $(".pstcrosssell_prev").click(function () {
361	pstcrosssell.trigger('owl.prev');
362 });
363 
364 /*======  Carousel Slider For Manufacture ==== */
365 var pstbrand = $("#pstbrand-carousel");
366 pstbrand.owlCarousel({
367	items: 4, //10 items above 1000px browser width
368	itemsDesktop: [1299, 4],
369	itemsDesktopSmall: [991, 4],
370	itemsTablet: [767, 3],
371	itemsTabletSmall: [543, 2],
372	itemsMobile: [479, 1],
373	pagination: false,
374	slideSpeed: 1500,
375	rewindSpeed: 1000
376 });
377 // Custom Navigation Events
378 $(".pstbrand_next").click(function () {
379	pstbrand.trigger('owl.next');
380 })
381 $(".pstbrand_prev").click(function () {
382	pstbrand.trigger('owl.prev');
383 });
384 
385 /*======  Carousel Slider For For Tesimonial ==== */
386 
387 var tmtestimonial = $("#testimonial-carousel");
388 tmtestimonial.owlCarousel({
389	autoPlay: false,
390	singleItem: true,
391	pagination: true,
392	navigation: false,
393	transitionStyle: "fade",
394	slideSpeed: 1500,
395	rewindSpeed: 1000,
396 });
397 
398 
399 function bindGrid() {
400	var view = $.totalStorage("display");
401 
402	if (view && view != 'grid')
403	   display(view);
404	else
405	   $('.display').find('li#grid').addClass('selected');
406 
407	$(document).on('click', '#grid', function (e) {
408	   e.preventDefault();
409	   display('grid');
410	});
411 
412 
413	$(document).on('click', '#list', function (e) {
414	   e.preventDefault();
415	   display('list');
416	});
417 }
418 
419 function display(view) {
420	if (view == 'list') {
421	   $('#products ul.product_list').removeClass('grid').addClass('list');
422	   $('#products .product_list > li').removeClass('col-xs-12 col-sm-6 col-md-4 col-lg-4 col-xl-4').addClass('col-xs-12');
423 
424	   $('#products .product_list > li .thumbnail-container').addClass('col-xs-4 col-xs-5 col-md-4');
425	   $('#products .product_list > li .product-description ').addClass('center-block col-xs-4 col-xs-7 col-md-8');
426 
427 
428	   $('.display').find('li#list').addClass('selected');
429	   $('.display').find('li#grid').removeAttr('class');
430	   $.totalStorage('display', 'list');
431	} else {
432	   $('#products ul.product_list').removeClass('list').addClass('grid');
433	   $('#products .product_list > li').removeClass('col-xs-12').addClass('col-xs-12 col-sm-6 col-md-4 col-lg-4 col-xl-4');
434	   $('#products .product_list > li .thumbnail-container').removeClass('col-xs-4 col-xs-5 col-md-4');
435	   $('#products .product_list > li .product-description').removeClass('center-block col-xs-4 col-xs-7 col-md-8');
436 
437 
438	   $('.display').find('li#grid').addClass('selected');
439	   $('.display').find('li#list').removeAttr('class');
440	   $.totalStorage('display', 'grid');
441	}
442 }
443 
444 
445 function responsivecolumn() {
446 
447	/* 	if ($(document).width() > 991){
448					
449			// ---------------- Fixed header responsive ----------------------
450			$(window).bind('scroll', function () {
451				if ($(window).scrollTop() > 0) {
452					$('.nav-bar').addClass('fixed');
453				} else {
454					$('.nav-bar').removeClass('fixed');
455				}
456			});
457		}
458		else if($(document).width() <= 991){
459			$(window).bind('scroll', function () {
460				if ($(window).scrollTop() > 0) {
461					$('.header-nav').addClass('fixed');
462				} else {
463					$('.header-nav').removeClass('fixed');
464				}
465			});
466		} */
467 
468 
469	if ($(document).width() <= 991) {
470	   $('.container #columns_inner #left-column').appendTo('.container #columns_inner');
471 
472	} else if ($(document).width() >= 992) {
473	   $('.container #columns_inner #left-column').prependTo('.container #columns_inner');
474 
475	}
476 }
477 $(document).ready(function () {
478	responsivecolumn();
479 });
480 $(window).resize(function () {
481	responsivecolumn();
482 });
483 
484 // JS for fixed the header
485 function HeadFixTop() {
486	var num = 179;
487	/*    if ($(document).width() >= 992){
488		$(window).bind('scroll', function () {
489			if ($(window).scrollTop() > num) {
490				$('.tc-top-menu').addClass('fixed');
491			} else {
492				$('.tc-top-menu').removeClass('fixed');
493			}
494		});
495	   } */
496 }
497 jQuery(document).ready(function () {
498	"use strict";
499	HeadFixTop();
500	$("#top-menu .sub-menu li:has(ul)").parent().parent().parent().addClass("mega");
501    $("#top-vertical-menu li:has(ul)").parent().parent().addClass("mega");
502 });
503 jQuery(window).resize(function () {
504	"use strict";
505	HeadFixTop()
506 });
507 
508 
509 $(document).on('click', '.icon_menu, .carthome, .cart_custom ', function () {
510	$('body').addClass('menu_shown');
511	$('.overlay').addClass('overlay_active');
512 });
513 $(document).on('click', '.close-icon, .overlay', function () {
514	$('body').removeClass('menu_shown');
515	$('.overlay').removeClass('overlay_active');
516 });
517 $(document).on('click', '.cart_block .remove-from-cart .material-icons', function () {
518	$('.overlay').addClass('overlay_active');
519 });

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.