PageSourceSearch

https://act.su/dist/prog/custom.js?17410002387238

js act.su collected 2026-10-06 20:42:25 UTC 7,238 bytes, 148 lines download raw bytes

1(function($) {
2    $.fn.removeClassWild = function(mask) {
3        return this.removeClass(function(index, cls) {
4            var re = mask.replace(/\*/g, '\\S+');
5            return (cls.match(new RegExp('\\b' + re + '', 'g')) || []).join(' ');
6        });
7    };
8})(jQuery);
9
10$(function(){
11  $(document).on('click','.menu.menu--open .menu__section-toggle',function(){
12      var section = $(this).data('section-toggle');
13      $('div[data-barba="container"]').removeClassWild("section_*");
14      $('div[data-barba="container"]').addClass('section_'+section);
15  });
16  $(document).on('click','.header__bottom .header__menu .header__button',function(){
17      var section = $('.menu__tech-list .menu__section-toggle.is-active').data('section-toggle');
18      if($('body').hasClass('menu-is-open')){
19        $('div[data-barba="container"]').removeClassWild("section_*");  
20      }else{
21          $('div[data-barba="container"]').addClass('section_'+section);
22      }    
23      
24      //
25  }); 
26    
27  //VALIDATE_MASK_PHONE
28  phone_input = $(".form_time_pop input[placeholder*='Телефон']").inputmask("+7 (999) 999-99-99");
29  $(document).on('click','input[type="submit"]',function(e){
30        input_valid = $(this).parents('form').find(phone_input);
31        if(input_valid.length > 0){
32            if($(input_valid).inputmask("isComplete")){  
33                $(input_valid).next('.error_valid').remove();
34            }
35            else{
36                e.preventDefault();
37                if($(input_valid).next('.error_valid').length == 0){
38                    $('<span class="error_valid">Введите корректный номер телефона</span>').insertAfter(input_valid);
39                }						
40            }
41        }
42    });
43    $(document).on('keyup',phone_input,function(){			
44        if($(this.activeElement).inputmask("isComplete")){  
45            $(this.activeElement).next('.error_valid').remove();				
46        }
47    });	
48    
49	$('body').on('change', '.policy_check.checkbox_field input', function () {
50		if (!$(this).is(':checked')) {
51			$(this).parents('form').find('.button').addClass('disabled-button').attr("disabled", "disabled");
52		} else {
53			$(this).parents('form').find('.button').removeClass('disabled-button').removeAttr("disabled");
54		}
55	});	    
56     if($('.pop_form_sales_btn').length > 0){
57        //$('.with-aside__left.user-text .with-aside__container').append($('.pop_form_sales_btn'));
58         //console.log(312321);
59     }
60
61    $(".cards-layout__container_seo_text").each(function(){
62        console.log($(this).text());
63        if($.trim($(this).text()) == ""){
64            $(this).remove();
65        }
66    });
67    
68    $(document).on('click','.categories-list__container .categories-list__item',function(){
69      
70        $(this).toggleClass('is-active');
71        $(this).find('.action-dropdown').toggleClass('is-active');
72        //$('.categories-list__container .action-dropdown__content').css({'height' : '0', 'min-height':'0'});
73        //$('.categories-list__container .categories-list__item').removeClass('is-active');
74        //$('.categories-list__container .categories-list__item .action-dropdown').removeClass('is-active');
75        if($(this).hasClass('is-active')){
76            $(this).find('.action-dropdown__content').css({'height' : 'auto', 'min-height':'auto'});
77        }else{
78            $(this).find('.action-dropdown__content').css({'height' : '0', 'min-height':'0'});
79        }
80    });
81    
82    ///YANDEX
83    $(document).on('click','button[type="submit"]',function(){
84        if($(this).find('.button__text').text() == "Заказать звонок"){            
85            ym(44926993,'reachGoal','zakazat_zvonok');            
86        }
87        if($(this).find('.button__text').text() == "Получить цену"){            
88            ym(44926993,'reachGoal','poluchit_cenu');            
89        }  
90        
91        if($(this).find('.button__text').text() == "Записаться" && $(this).parents('.request-form__info').find('.request-form__title').text() == "Записаться на демо-показ"){            
92            ym(44926993,'reachGoal','zapisatsya_demo_pokaz');            
93        }  
94        if($(this).find('.button__text').text() == "Отправить" && $(this).parents('.form__container').find('.form__title').text() == "Написать сообщение"){            
95            ym(44926993,'reachGoal','napisat_soobshchenie');            
96        } 
97        if($(this).find('.button__text').text() == "Отправить заявку" && $(this).parents('.request-form__info').find('.request-form__title').text() == "Оставьте заявку на покупку и мы сразу подготовим для вас персональное предложение"){            
98            ym(44926993,'reachGoal','otpravit_zayavku');            
99        }          
100    });  
101    
102    $(document).on('click','button[type="button"]',function(){
103        if($(this).find('.button__text').text() == "Узнать цену"){            
104            ym(44926993,'reachGoal','poluchit_cenu');            
105        }   
106    });
107    
108    $(document).on('submit','form',function(){
109        if($(this).find('.request-form__title').text() == "Записаться на демо-показ"){            
110            ym(44926993,'reachGoal','demo_pokaz_submit');            
111        }
112        if($(this).find('.request-form__title').text() == "Оставьте заявку на покупку и мы сразу подготовим для вас персональное предложение"){            
113            ym(44926993,'reachGoal','ostavte_zayavku_na_pokupku_submit');            
114        }          
115    });     
116    
117     $(document).on('click','.simple-popup__action a',function(e){
118          e.preventDefault();
119          window.open($(this).attr('href'), '_blank');
120     });
121    
122     $(document).on('click','.simple-popup .simple-popup__close',function(){
123            document.cookie = "simple_popup_"+$(this).parents('.simple-popup').data('id')+"="+$(this).parents('.simple-popup').data('id')+"; path=/;";
124            //console.log(document.cookie);
125     }); 
126    
127     $(document).on('click','.button_sale_detail',function(e){
128        $('.prod_form_hidden input').val($('h1:first').text());
129        $('#pop_form_sales_detail .form_time_title').text($('h1:first').text());
130     });    
131    $(document).on('click','.header__location .header__button',function(e){ 
132        //$('.location-initial__bottom .button:last-child').trigger('click');
133    });
134    $(document).on('click','.product-view-options div[data-link_tabs="service"]',function(){
135        //document.querySelector('.product-view-options div[data-link_tabs="service"]').click();
136        
137        const event = new Event('click')
138        const dropdownEl = document.querySelector('.nav-panel__items a[href="#service"]')
139
140        dropdownEl.addEventListener('click', () => console.log('Dropdown clicked!'));
141        dropdownEl.dispatchEvent(event);        
142        
143    });
144    
145    
146}); 
147
148

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.