PageSourceSearch

https://markformelle.kz/local/templates/markformelle/components/bitrix/menu/header_menu/script.js

js markformelle.kz collected 2026-09-28 22:49:17 UTC 3,130 bytes, 98 lines download raw bytes

1/* Высота для бокового меню */
2function calcMenuHeight() {
3    let calcMenuHeight;
4
5    if($(window).width() <= 1024) {
6        calcMenuHeight = $(window).height() - 65 - 75;
7        $('.header-menu-fixed__wrapper').height(calcMenuHeight);
8    }
9
10    else if($(window).width() > 1024) {
11        $('.header-menu-fixed__wrapper').height('');
12    }
13}
14calcMenuHeight();
15$(window).on('resize', calcMenuHeight);
16
17/* Обработчик открытия/закрытия меню */
18function menuHandler() {
19    $('body').on('click', '.js-header-menu-button', function () {
20        $('.header-menu-fixed').addClass('show');
21        $('.header-block--left').addClass('hide');
22        $('.promo-language').addClass('hide');
23    });
24
25    $('body').on('click', '.js-header-menu-close', function () {
26        $('.header-menu-fixed').removeClass('show');
27        $('.header-block--left').removeClass('hide');
28        $('.promo-language').removeClass('hide');
29    })
30}
31
32/* Кастомный скроллбар */
33function menuScrollBar() {
34    if($(window).width() > 1024) {
35        $('.header-menu-fixed__wrapper').mCustomScrollbar();
36    }
37
38    else if($(window).width() <= 1024) {
39        $('.header-menu-fixed__wrapper').mCustomScrollbar('destroy');
40    }
41}
42menuScrollBar();
43$(window).on('resize', menuScrollBar);
44
45/* Условия для страницы каталога */
46function inCatalog() {
47    if($('.catalog-filter').length > 0) {
48
49        function inCatalogResize() {
50            if($(window).width() <= 990) {
51                $('.header-menu-fixed').removeClass('show');
52                $('.header').removeClass('header--catalog');
53                $('.catalog-filter .jq-selectbox select').trigger('refresh');
54            }
55
56            else if ($(window).width() > 990) {
57                $('.header-menu-fixed').addClass('show');
58                $('.header').addClass('header--catalog');
59                $('.catalog-filter .jq-selectbox select').trigger('refresh');
60            }
61        }
62        inCatalogResize();
63        $(window).on('resize', inCatalogResize);
64    }
65}
66inCatalog();
67
68function spanIt(ob) {
69    $(ob).parent().find('.custom-dropdown__toggler').click();
70}
71
72function spanIt2(ob) {
73    $(ob).parent().find('.popup-city__list').toggleClass('spaned');
74}
75
76/* Поведение хедера при скролле */
77$(window).on('scroll', function () {
78    if($(window).scrollTop() > 0) {
79        $('.header').addClass('header--white');
80    }
81
82    else if($(window).scrollTop() == 0 && !$('.catalog-menu-block').hasClass('opened')) {
83        $('.header').removeClass('header--white');
84    }
85});
86$(document).on('keyup', '#popup-get-city', function () {
87    if ($(this).val().length > 2)
88    {
89        $.ajax({
90            type: $('#popup-city-form').attr('method'),
91            url: $('#popup-city-form').attr('action'),
92            data: $('#popup-city-form').serialize(),
93            success: function(data){
94                $("#return_cities").html(data);
95            }
96        });
97    }
98});

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.