PageSourceSearch

https://moclinic.ru/local/templates/main/comp/service-nav/__service-nav.js?17653836243152

js moclinic.ru collected 2026-09-28 09:32:45 UTC 3,152 bytes, 103 lines download raw bytes

1$(document).ready(function () {
2    $htmlElement = $('html');
3    $bodyElement = $('body');
4
5    function blockScroll() {
6        $htmlElement.addClass('js-no-scroll');
7        $bodyElement.addClass('js-no-scroll');
8    }
9
10    function releaseScroll() {
11        $htmlElement.removeClass('js-no-scroll');
12        $bodyElement.removeClass('js-no-scroll');
13    }
14
15    function showServices() {
16        $('.desctop-nav').addClass('is-open');
17        blockScroll();
18    }
19
20    function hideServices() {
21        $('.desctop-nav').removeClass('is-open');
22        releaseScroll();
23    }
24
25    function hideSearch() {
26        $('.desctop-nav').removeClass('is-search');
27        releaseScroll();
28    }
29    function handleMouseEnter(element, className) {
30        if ($(element).hasClass(className)) {
31            showServices();
32        } else {
33            hideServices();
34        }
35    }
36    // $('.desctop-nav-menu__item').on('mouseenter', function(){
37	// 	if ($(this).hasClass('--services')) {
38    //         showServices();
39    //     } else {
40    //         hideServices();
41    //     }
42	// });
43    // $('.child-menu').on('mouseenter', function(){
44	// 	if ($(this).hasClass('--services-child')) {
45    //         showServices();
46    //     } else {
47    //         hideServices();
48    //     }
49    // });
50    
51    
52
53    $('.desctop-nav-menu__item').on('mouseenter', function(){
54        if ($(this).hasClass('--services')) {
55            showServices();
56            $('.service-nav').addClass('animated fadeIn').removeClass('d-none');  // Показываем блок service-nav
57            $('.child-nav').addClass('d-none');  // Прячем блок child-nav
58        } else {
59            hideServices();
60        }
61    });
62    
63    $('.child-menu').on('mouseenter', function(){
64        if ($(this).hasClass('--services-child')) {
65            showServices();
66            $('.child-nav').addClass('animated fadeIn').removeClass('d-none');  // Показываем блок child-nav
67            $('.service-nav').addClass('d-none');  // Прячем блок service-nav
68        } else {
69            hideServices();
70        }
71    });
72    
73    // Скрытие блоков при уходе мыши
74    $('.service-nav, .child-nav').on('mouseleave', function(){
75        $(this).addClass('d-none');  // Скрываем блок, добавляем d-none
76    });
77
78    
79    $('.desctop-nav__shade').on('mouseenter', function(){
80        hideServices();
81	});
82
83    $('.desctop-nav__shade').on('click', function(){
84        hideSearch();
85    });
86
87    $('.service-nav__section-close').on('click', function(){
88        hideServices();
89        hideSearch();
90	});
91
92    $('.service-nav__section-group-show-more').on('click', function(){
93        $(this).parents('.service-nav__section-group').toggleClass('is-show-all');
94	});
95
96    $('.service-nav__sections-item').on('mouseenter', function(){
97        $('.service-nav__sections-item').removeClass('is-active');
98        $(this).addClass('is-active');
99        let id = $(this).data('id');
100        $('.service-nav__section').removeClass('is-show');
101        $('.service-nav__section.--id-' + id).addClass('is-show');
102	});
103});

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.