PageSourceSearch

https://victoria-kmv.ru/js/script.js

js victoria-kmv.ru collected 2026-09-29 14:16:53 UTC 8,565 bytes, 238 lines download raw bytes

1$(document).ready(function(){
2    $(".statii-more__block").owlCarousel({
3        rewind: true,
4        nav: true,
5        dots: false,
6        margin: 10,
7        responsiveClass: true,
8        responsive: {
9            0: {
10                items: 1
11            },
12            767: {
13                items: 2
14            }
15        }
16    });
17
18    $(".polezno__block").owlCarousel({
19        rewind: true,
20        nav: false,
21        dots: true,
22        margin: 10,
23        responsiveClass: true,
24        responsive: {
25            0: {
26                items: 1
27            },
28            767: {
29                items: 2
30            },
31            1024: {
32                items: 3
33            }
34        }
35    });
36
37    $(".utp-otzivy__block").owlCarousel({
38        rewind: true,
39        nav: false,
40        dots: true,
41        margin: 10,
42        responsiveClass: true,
43        responsive: {
44            0: {
45                items: 1,
46                margin: 0
47            },
48            767: {
49                items: 2
50            },
51            1024: {
52                items: 3
53            }
54        }
55    });
56
57    $(".content-block.section-menu ul li:last-of-type").after("<li style='display: none;'><div><p class='cats_close-more'>Скрыть</p></div></li>");
58
59    // if ($(".content-block.section-menu ul").children().length > 3) {
60    //     $(".content-block.section-menu").append("<div style='text-align: right; top: -10px; position: relative;'><p class='show-more-cats' style='text-align: center; display: inline-block; cursor: pointer; padding: 7px; border: 1px solid; border-radius: 6px; max-width: 150px; background: #f2f0f0;'>Показать еще</p></div>");
61    // }
62
63    $(".show-more-cats").on("click", function() {
64        $(".content-block.section-menu ul li").css('display', 'inline-block');
65        $(this).closest('li').hide();
66    });
67    
68    $(".cats_close-more").on("click", function() {
69        $(".content-block.section-menu ul li:gt(3)").css('display', 'none');
70        $('.show-more-cats').closest('li').css('display', 'inline-block');
71    });
72
73    if ($(".content-block.section-menu ul").children().length <= 6) {
74        $(".content-block.section-menu ul li:nth-of-type(5), .content-block.section-menu ul li:nth-of-type(6)").hide();
75    }
76
77    if (window.innerWidth < 768) {
78        $('.content-block.treatment-block ul li:nth-child(4)').after("<li><div><p class='show-more-cats'>Показать</p></div></li>");
79        $('.content-block.treatment-block ul li:last-of-type').after("<li style='display: none;'><div><p class='cats_close-more'>Скрыть</p></div></li>");
80    
81        $(".content-block.treatment-block ul li:gt(4)").css('display', 'none');
82    
83        $(".show-more-cats").on("click", function() {
84            $(".content-block.treatment-block ul li").css('display', 'block');
85            $(this).closest('li').hide();
86        });
87        
88        $(".cats_close-more").on("click", function() {
89            $(".content-block.treatment-block ul li:gt(3)").css('display', 'none');
90            $('.show-more-cats').closest('li').css('display', 'block');
91        });
92    }
93
94    $(window).resize(function() {
95        if (window.innerWidth < 768) {
96            $(".content-block.treatment-block ul li:gt(4)").css('display', 'none');
97        
98            $(".show-more-cats").on("click", function() {
99                $(".content-block.treatment-block ul li").css('display', 'block');
100                $(this).closest('li').hide();
101            });
102            
103            $(".cats_close-more").on("click", function() {
104                $(".content-block.treatment-block ul li:gt(3)").css('display', 'none');
105                $('.show-more-cats').closest('li').css('display', 'block');
106            });
107        }
108    });
109
110    $(document).ready(function() {
111        // Перебираем все элементы на странице
112        $('*').each(function() {
113            // Проверяем, есть ли у любого родителя стиль background:#eace97
114            if ($(this).parents().filter(function() {
115                return $(this).css('background-color') === 'rgb(234, 206, 151)';
116            }).length > 0) {
117                // Если условие выполняется, добавляем элементу стиль position:unset
118                $(this).addClass('no-before');
119            }
120        });
121    });
122
123    $('.nomera__block').owlCarousel({
124        loop: true,
125        margin: 20,
126        nav: false,
127        responsiveClass: true,
128        responsive: {
129            0: {
130                items: 1
131            },
132            767: {
133                items: 2
134            }
135        }
136    });
137
138    $(function() {
139        $(window).scroll(function() {
140            if($(window).scrollTop() > 100) {
141                $('#scroll_top').show();
142            } else {
143                $('#scroll_top').hide();
144            }
145        });
146
147        $('#scroll_top').click(function() { 
148            $('html, body').animate({scrollTop: 0}, 400); 
149        
150            return false;
151        });
152    });
153   
154    $('#callback input[name="form_text_2"]').inputmask("+7 (999) 999 99 99");
155    $('form[name="SIMPLE_FORM_6"] input[name="form_text_86"]').inputmask("+7 (999) 999 99 99");
156    $('form[name="SIMPLE_FORM_3"] input[name="form_text_12"]').inputmask("+7 (999) 999 99 99");
157    $('form[name="SIMPLE_FORM_3_87xvQ"] input[name="form_text_61"]').inputmask("+7 (999) 999 99 99");
158
159    $('.abc-block').closest('.content-block').find('h2').css('font-size', '20px');
160
161$(function($) {
162    if (window.location.pathname.includes('/poleznye-stati/')) {
163        const wrapper = $('.news-detail');
164        const detailPicture = wrapper.find('.detail_picture');
165
166        const contentBlock = $(
167            '<div class="contents-block">' +
168            '<h2 class="contents-title">Содержание</h2>' +
169            '<ul class="contents-list"></ul>' +
170            '</div>'
171        );
172
173        // Определяем, куда вставлять блок содержания
174        if (detailPicture.length) {
175            detailPicture.after(contentBlock);
176        } else {
177            wrapper.prepend(contentBlock);
178        }
179
180        // Сбор всех заголовков h2 внутри .news-detail (но не внутри содержания)
181        const headings = wrapper.find('h2').not(contentBlock.find('h2'));
182
183        headings.each(function(index) {
184            const heading = $(this);
185            const anchor = `section-${index + 1}`;
186
187            // Добавляем якорь, только если его ещё нет
188            if (!heading.attr('id')) {
189                heading.attr('id', anchor);
190            }
191
192            let headingText = heading.text().trim();
193            headingText = headingText.replace(/[.,;:!?]+$/, '');
194
195            $('<li>').append(
196                $(`<a href="#${anchor}">`).text(headingText)
197            ).appendTo(contentBlock.find('ul'));
198        });
199    }
200});
201
202  $('.switch').on('click', function(e) {
203    e.preventDefault();
204    e.stopImmediatePropagation();
205    
206    $(this).toggleClass('minus')
207           .text(function() {
208             return $(this).hasClass('minus') ? '⊖' : '⊕';
209           })
210           .closest('li').find('> ul').slideToggle();
211  });
212});
213
214$(function() {
215    var $trigger = $('#ny-trigger');
216    var $panel = $('#ny-panel');
217    var $closeBtn = $panel.find('.close-btn');
218
219    // При клике на картинку — прячем картинку, показываем плашку
220    $trigger.on('click', function(e) {
221        e.preventDefault();
222        $trigger.hide(); // скрываем картинку
223        $panel.show().css('left', '-320px'); // сначала за экраном
224        setTimeout(function() {
225            $panel.css('left', '20px'); // выезжаем на место картинки
226        }, 10);
227    });
228
229    // При клике на крестик — уезжаем и возвращаем картинку
230    $closeBtn.on('click', function(e) {
231        e.preventDefault();
232        $panel.css('left', '-320px');
233        setTimeout(function() {
234            $panel.hide();
235            $trigger.show(); // возвращаем картинку
236        }, 400); // ждём окончания анимации
237    });
238});

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.