PageSourceSearch

https://edusite.ru/js/my.js

js edusite.ru collected 2026-10-01 09:02:54 UTC 6,118 bytes, 219 lines download raw bytes

1$(function(){
2
3    $(".js_btn-scroll").on('click', function(event) {
4        if (this.hash !== "") {
5            event.preventDefault();
6
7            var hash = this.hash;
8
9            $('html, body').animate({
10                scrollTop: $(hash).offset().top
11            }, 600, function(){
12                window.location.hash = hash;
13            });
14        }
15    });
16
17    // collapse
18
19    $('.js_show-all').on('click', function(event) {
20        $(this).closest(".js_container").find(".js_hidden").slideToggle(500);
21        $(this).closest(".js_container").find(".js_hidden").toggleClass("opened");
22        $('.work__tab').removeClass('active');
23        $(this).toggleClass('active');
24
25        return false;
26    });
27
28    // slick
29
30    $('.js_slider-works').slick({
31        infinite: true,
32        slidesToShow: 1,
33        dots: false,
34        arrows: false,
35        slidesToScroll: 1,
36        autoplay: true,
37        fade: true,
38
39    });
40
41
42    $('a[data-slide]').click(function(e) {
43        e.preventDefault();
44        var current = $(this).data('slide');
45        $('.js_slider-works').slick('slickGoTo', current - 1);
46        $('.work__tab').removeClass('active');
47        $(this).addClass('active');
48    });
49
50    $('.js_slider-works').on('beforeChange', function(event, slick, currentSlide, nextSlide){
51        $('.work__tab').removeClass('active');
52        $('.work__tab').eq(nextSlide).addClass('active');
53    });
54
55    // design gallery
56
57    $('.js_slider-design').slick({
58        infinite: true,
59        slidesToShow: 1,
60        dots: false,
61        arrows: false,
62        slidesToScroll: 1,
63        autoplay: true,
64        fade: true,
65
66    });
67
68
69    $('.js_menu-btn').on('click', function() {
70        $('.js_menu-content').slideToggle(500);
71        return false;
72    });
73});
74
75$(function(){
76
77    $(".js_btn-scroll").on('click', function(event) {
78        if (this.hash !== "") {
79            event.preventDefault();
80
81            var hash = this.hash;
82
83            $('html, body').animate({
84                scrollTop: $(hash).offset().top
85            }, 600, function(){
86                window.location.hash = hash;
87            });
88        }
89    });
90
91    // collapse
92
93    $('.js_show-all').on('click', function(event) {
94        $(this).closest(".js_container").find(".js_hidden").slideToggle(500);
95        $(this).closest(".js_container").find(".js_hidden").toggleClass("opened");
96        $('.work__tab').removeClass('active');
97        $(this).toggleClass('active');
98
99        return false;
100    });
101
102    // slick
103
104    $('.js_slider-works').slick({
105        infinite: true,
106        slidesToShow: 1,
107        dots: false,
108        arrows: false,
109        slidesToScroll: 1,
110        autoplay: true,
111        fade: true,
112
113    });
114
115
116    $('a[data-slide]').click(function(e) {
117        e.preventDefault();
118        var current = $(this).data('slide');
119        $('.js_slider-works').slick('slickGoTo', current - 1);
120        $('.work__tab').removeClass('active');
121        $(this).addClass('active');
122    });
123    $('.js_slider-works').on('beforeChange', function(event, slick, currentSlide, nextSlide) {
124        if ($(window).width() >= 768) {
125            $('.work__tab').removeClass('active');
126            $('.work__tab').eq(nextSlide).addClass('active');
127        } else {
128            $('.work__tab').removeClass('active');
129        }
130    });
131
132    // design gallery
133
134    $('.js_slider-design').slick({
135        infinite: true,
136        slidesToShow: 1,
137        dots: false,
138        arrows: false,
139        slidesToScroll: 1,
140        autoplay: true,
141        fade: true,
142
143    });
144
145
146    $('.js_menu-btn').on('click', function() {
147        $('.js_menu-content').slideToggle(500);
148        return false;
149    });
150});
151(function () {
152  document.querySelectorAll('.faq-question-item > .faq-question').forEach(function (q) {
153    q.setAttribute('role', 'button');
154    q.setAttribute('tabindex', '0');
155    q.setAttribute('aria-expanded', 'false');
156
157    function toggle() {
158      var item = q.parentElement;
159      var isOpen = item.classList.toggle('active');
160      q.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
161    }
162
163    q.addEventListener('click', toggle);
164    q.addEventListener('keydown', function (e) {
165      if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggle(); }
166    });
167  });
168})();
169
170(function () {
171  document.querySelectorAll('.price-table').forEach(function (table) {
172    var colCells = {};
173    Array.from(table.rows).forEach(function (row) {
174      Array.from(row.cells).forEach(function (cell) {
175        var idx = cell.cellIndex;
176        if (!colCells[idx]) colCells[idx] = [];
177        colCells[idx].push(cell);
178      });
179    });
180
181    function clearHighlight() {
182      table.querySelectorAll('.col-hover').forEach(function (c) { c.classList.remove('col-hover'); });
183    }
184
185    table.addEventListener('mouseover', function (e) {
186      var cell = e.target.closest('th, td');
187      if (!cell || cell.cellIndex < 1) { clearHighlight(); return; }
188      var idx = cell.cellIndex;
189      if (table.querySelector('.col-hover') && colCells[idx] && colCells[idx][0].classList.contains('col-hover')) return;
190      clearHighlight();
191      (colCells[idx] || []).forEach(function (c) { c.classList.add('col-hover'); });
192    });
193
194    table.addEventListener('mouseleave', clearHighlight);
195  });
196})();
197
198(function () {
199  var yearSwitch = document.getElementById('priceYearSwitch');
200  var labels = document.querySelectorAll('.price-year-toggle__label');
201  var wraps = document.querySelectorAll('.price-year-item');
202  if (!yearSwitch || !wraps.length) return;
203
204  function setPriceYear(year) {
205    wraps.forEach(function (w) { w.classList.toggle('is-active', w.getAttribute('data-year') === year); });
206    labels.forEach(function (l) { l.classList.toggle('is-active', l.getAttribute('data-year') === year); });
207    yearSwitch.checked = year === '2027';
208  }
209
210  yearSwitch.addEventListener('change', function () {
211    setPriceYear(this.checked ? '2027' : '2026');
212  });
213
214  labels.forEach(function (label) {
215    label.addEventListener('click', function () {
216      setPriceYear(label.getAttribute('data-year'));
217    });
218  });
219})();

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.