PageSourceSearch

https://mfk-torg.ru/wa-data/public/site/themes/megashop2/assets/custom.js?v=1.12.1.259

js mfk-torg.ru collected 2026-09-28 13:50:43 UTC 3,977 bytes, 153 lines download raw bytes

1// Sliders and Menu Functionality
2// Extracted from main.min.js (lines 3925-4002)
3
4// jQuery document ready wrapper for sliders
5$(function() {
6	// Receipts slider initialization
7	$(".slider-banner").slick({
8        slidesToShow: 1,
9		autoplay: true,
10		autoplaySpeed: 4000,
11        slidesToScroll: 1,
12        adaptiveHeight: !0,
13        appendArrows: ".slider-banner__navigation",
14        responsive: [{
15            breakpoint: 550,
16            settings: {
17                slidesToShow: 1,
18                appendArrows: !1,
19                dots: !0
20            }
21        }]
22    }),
23	$(".receipts-slider").slick({
24		slidesToShow: 4,
25		slidesToScroll: 1,
26		responsive: [{
27			breakpoint: 1350,
28			settings: {
29				slidesToShow: 3
30			}
31		}, {
32			breakpoint: 1050,
33			settings: {
34				slidesToShow: 2
35			}
36		}, {
37			breakpoint: 700,
38			settings: {
39				slidesToShow: 1,
40				arrows: false
41			}
42		}]
43	});
44
45	// Mobile sliders (only on screens < 550px)
46	if ($(window).width() < 550) {
47		$(".category-block").slick({
48			slidesToShow: 1,
49			slidesToScroll: 1,
50			arrows: false
51		});
52
53		$(".producthome-block").slick({
54			slidesToShow: 1,
55			slidesToScroll: 1,
56			arrows: false
57		});
58
59		$(".sistem-block").slick({
60			slidesToShow: 1,
61			slidesToScroll: 1,
62			arrows: false
63		});
64
65		$(".fittings-block").slick({
66			slidesToShow: 1,
67			slidesToScroll: 1,
68			arrows: false
69		});
70	}
71
72	// Industry block button click handler
73	$(".industry-block__btn").on("click", function() {
74		$(".industry-block__hide").addClass("block-class");
75		$(".industry-block__btn").addClass("btn-none");
76	});
77
78	// Footer block accordion (mobile only)
79	if ($(window).width() < 550) {
80		$(".footer-block__item-title").on("click", function() {
81			$(this).next().slideToggle(500);
82			$(this).toggleClass("open");
83		});
84	}
85});
86
87// Native JavaScript for menu and navigation
88window.addEventListener("DOMContentLoaded", function() {
89	// Mobile menu toggle
90	const menu = document.querySelector(".menu");
91	const navIcon = document.querySelector(".nav-icon");
92	
93	if (navIcon && menu) {
94		navIcon.addEventListener("click", function() {
95			this.classList.toggle("nav-icon--active");
96			menu.classList.toggle("nav--active");
97			document.body.classList.toggle("overflow");
98		});
99	}
100
101	// Category menu toggle
102	const categoryText = document.querySelector(".header-center__category-text");
103	const categoryMenu = document.querySelector(".header-center__menu");
104	
105	if (categoryText && categoryMenu) {
106		categoryText.addEventListener("click", function() {
107			categoryMenu.classList.toggle("category-block");
108			categoryText.classList.toggle("arrow");
109		});
110	}
111
112	// Dropdown tabs functionality
113	const dropdownLeft = document.querySelector(".header-dropdown__left");
114	const dropdownLeftItems = document.querySelectorAll(".header-dropdown__left-item");
115	const dropdownRight = document.querySelectorAll(".header-dropdown__right");
116
117	function hideAllTabs() {
118		dropdownRight.forEach(function(item) {
119			item.classList.add("tabs-hide");
120			item.classList.remove("tabs-show");
121		});
122		dropdownLeftItems.forEach(function(item) {
123			item.classList.remove("tabs-active");
124		});
125	}
126
127	function showTab(index) {
128		if (dropdownRight[index] && dropdownLeftItems[index]) {
129			dropdownRight[index].classList.add("tabs-show");
130			dropdownRight[index].classList.remove("tabs-hide");
131			dropdownLeftItems[index].classList.add("tabs-active");
132		}
133	}
134
135	if (dropdownLeft && dropdownRight.length > 0 && dropdownLeftItems.length > 0) {
136		dropdownLeft.addEventListener("click", function(e) {
137			const target = e.target;
138			if (target && target.classList.contains("header-dropdown__left-item")) {
139				dropdownLeftItems.forEach(function(item, index) {
140					if (target === item) {
141						hideAllTabs();
142						showTab(index);
143					}
144				});
145			}
146		});
147		
148		// Initialize first tab
149		hideAllTabs();
150		showTab(0);
151	}
152});
153

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.