PageSourceSearch

https://profacademy.online/local/templates/profacademy/js/script.js?17907431857263

js profacademy.online collected 2026-10-03 20:18:18 UTC 7,263 bytes, 196 lines download raw bytes

1$(document).ready(function () {
2		$('.red-accept input[type="checkbox"]').on('change', function(){
3		  if($('.red-accept input[type="checkbox"]:checked').length>0){
4				$('.red-warning').addClass('d-none');
5		  } else {
6				$('.red-warning').removeClass('d-none');
7			}
8		});
9
10		$('.red-tel').on('focusin focusout change', function(){
11		  if($('.red-tel').val().includes('_') || $('.red-tel').val()==''){
12				$('.red-warning').removeClass('d-none');
13		  } else {
14				$('.red-warning').addClass('d-none');
15			}
16		});
17    
18		$('.red-submit').on('click', function(){
19			let pageErrors = [];
20		  if($('.red-accept input[type="checkbox"]:checked').length>0){
21		  } else {
22				pageErrors.push('checkbox');
23			}
24
25			$('.red-tel').on('focusout change', function(){
26			  if($('.red-tel').val().includes('_') || $('.red-tel').val()==''){
27					pageErrors.push('tel');
28				}
29			});
30
31	  	console.log(pageErrors);
32			if (Array.isArray(pageErrors) && pageErrors.length !== 0) {
33				$('.red-warning').removeClass('d-none');
34			} else {
35				$('.red-warning').addClass('d-none');
36			}
37		});
38
39    if($('.sliderWrapper').length) {
40        $('.sliderWrapper').each(function (i) {
41            let idSlider = $(this)[0].dataset.sliders;
42            let newClassItems = 'initSlider'+i;
43            let newNameItems = $(this).addClass(newClassItems);
44            let initClassNew = '.'+newClassItems;
45            let itemSlider = $(this).find('.sliderBlock');
46            let colSlider = +$(this).find('.sliderBlock')[0].dataset.col;
47            let autolistSliderItem = $(this).find('.sliderBlock')[0].dataset.col;
48            let paginationSliderItem = $(this).find('.sliderBlock')[0].dataset.pagi;
49            let infinitySliderItem = $(this).find('.sliderBlock')[0].dataset.infinity;
50            let tablet = +$(this).find('.sliderBlock')[0].dataset.tablet;
51            let mobile = +$(this).find('.sliderBlock')[0].dataset.mobile;
52            let autolistSlider = false;
53            let paginationSlider = false;
54            let infinitySlider = false;
55            let appendDots = '';
56            let tabletCol = 1;
57            let mobileCol = 1;
58            if (autolistSliderItem == 'true') {
59                autolistSlider = true;
60            }
61            if (paginationSliderItem == 'true') {
62                paginationSlider = true;
63                appendDots = $('.sliderPaginationBlock');
64            }
65            if (infinitySliderItem == 'true') {
66                infinitySlider = true;
67            }
68            if(tablet){
69                tabletCol = tablet;
70            }
71            if(mobile){
72                mobileCol = mobile;
73            }
74            const swiper = new Swiper(initClassNew, {
75                speed: 800,
76                slidesPerView: mobileCol,
77                navigation: {
78                    nextEl: '.rightButton',
79                    prevEl: '.leftButton',
80                },
81                pagination: {
82                    el: '.sliderPaginationBlock',
83                    type: 'bullets',
84                    clickable: true,
85                },
86                loop: infinitySlider,
87                breakpoints: {
88                    480: {
89                        slidesPerView: tablet,
90                    },
91                    768: {
92                        slidesPerView: tablet,
93                    },
94                    991: {
95                        slidesPerView: colSlider,
96                    }
97                }
98            });
99        })
100    }
101    $('.dropItem').click(function () {
102        $(this).toggleClass('active').next().slideToggle();
103        $('.dropItem').not(this).removeClass('active').next().slideUp();
104    });
105    $('.dropListItem').click(function () {
106        let name = $(this)[0].dataset.name;
107        $(this).parents('.dropBlock').find('.dropItem').removeClass('active').find('.dropItemName').text(name).parent().next().slideUp();
108        if($(this).parents('.dropBlock').prev()){
109            $(this).parents('.dropBlock').prev().val(name);
110        }
111    });
112    // $(document).mouseup( function(e){
113    //     let div = $('.dropBlock');
114    //     if ( !div.is(e.target)
115    //         && div.has(e.target).length === 0 ) {
116    //         div.find('.dropItem').removeClass('active').next().slideUp();
117    //     }
118    // });
119    let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
120    let tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
121        return new bootstrap.Tooltip(tooltipTriggerEl)
122    })
123    $('.dropNext').click(function () {
124        $(this).toggleClass('active').next().slideToggle();
125    });
126    $('.accordionTitle').click(function (e) {
127        $(this).next().slideToggle().parent().toggleClass('active');
128        $('.accordionTitle').not(this).next().slideUp().parent().removeClass('active');
129    });
130    $('.topMenuButton').click(function () {
131        $(this).toggleClass('active');
132        $('.openMenuBlock').slideToggle();
133    });
134    $('[data-target="tabButton"]').click(function () {
135        let action = $(this)[0].dataset.action;
136        let id = $(this)[0].dataset.id;
137        $('[data-target="tabButton"][data-action="'+action+'"]').removeClass('active');
138        $(this).addClass('active');
139        $('[data-target="tabContent"][data-action="'+action+'"]').hide().removeClass('active');
140        $('[data-target="tabContent"][data-action="'+action+'"][data-id="'+id+'"]').fadeIn().addClass('active');
141        if($('.toSctollActive').length){
142            let topBlock = $('.toSctollActive')[0].offsetTop - 160;
143            $("body,html").animate({
144                scrollTop:topBlock
145            }, 1);
146        }
147    });
148    let heightHeader = $('header').height();
149    $(window).scroll(function (){
150        if ($(this).scrollTop() > 500){
151            $("body").css('padding-top', heightHeader);
152            $('header').addClass('stickyHeader');
153        } else{
154            $("body").css('padding-top', 0);
155            $('header').removeClass('stickyHeader');
156        }
157    });
158    $('.buttonRevFilter').click(function () {
159        let text = $(this).text();
160        if($('.checkDropItemName').length){
161            $('.checkDropItemName').text(text);
162        }
163    });
164    //Поиск городов
165    $(".searchCityInput").on("keyup", function() {
166        let value = $(this).val().toLowerCase();
167        $(".searchCityBlock .searchCityItem").filter(function() {
168            $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
169        });
170    });
171    //-------------
172    $('.OpenSeoText').click(function () {
173        if($('.seoTextBlock').length){
174            $(this).toggleClass('active');
175            $('.seoTextBlock').slideToggle();
176        }
177        if($(this).hasClass('active')){
178            $(this).text('Скрыть');
179        }else {
180            $(this).text('Подробнее');
181        }
182    });
183});
184
185function disableBodyScroll(){
186	return false;
187}
188function enableBodyScroll(){
189	return false;
190}
191function scrollBottom(){
192	return false;
193}
194function ensureHeaderVisibility(){
195	return false;
196}

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.