PageSourceSearch

https://v-salda.ru/local/templates/salda-test/scripts/sliders.js?17328723535788

js v-salda.ru collected 2026-10-02 16:15:24 UTC 5,788 bytes, 267 lines download raw bytes

1$(document).ready(function () {
2	/*Верхний слайдер*/
3	var owl = $('.top-slides').not('.shutdowns-slides');
4	owl.owlCarousel({
5		loop:false,
6		nav:true,
7		dots: true,
8		touchDrag: true,
9		pullDrag: true,
10		autoplay: false,
11		autoWidth: true,
12		margin:0,
13		items:1
14	});
15	
16	var lens = owl.find('.owl-dot').length+1;
17	tepro = 100 / lens;
18	razko = 3;
19	if($(window).width() <= 1010){
20		razko = 2;
21	}
22	if($(window).width() <= 680){
23		razko = 2;
24	}
25	
26	owl.parent('.top-slider').find('.scrollbar-slider div').css('width', tepro*razko+'%')
27	
28    /*
29	owl.on('mousewheel', '.owl-stage', function (e) {
30		if (e.deltaY<0) {
31			owl.trigger('next.owl');
32		} else {
33			owl.trigger('prev.owl');
34		}
35		e.preventDefault();
36	});
37	*/
38    
39	owl.on('changed.owl.carousel', function(q) {
40		ntek = owl.find('.owl-dot.active').index()+razko;
41		tepro2 = ntek * tepro;
42		owl.parent('.top-slider').find('.scrollbar-slider div').css('width', tepro2+'%')
43		
44	});
45	
46	var nogo = false;
47	var nogo2 = true;
48	
49	owl.find('.owl-next').click(function () {
50		ts = owl.parent('.top-slider').find('.scrollbar-slider div.active');
51		if(nogo == false){
52			ts = owl.parent('.top-slider').find('.scrollbar-slider div.active');
53			ts.removeClass('active')
54			ts.next().addClass('active')
55			if($(this).hasClass('disabled')) {
56				nogo = true;
57			} else {
58				nogo = false;
59			}
60			nogo2 = false;
61		}
62	});
63	
64	owl.find('.owl-prev').click(function () {
65		ts = owl.parent('.top-slider').find('.scrollbar-slider div.active');
66		if(nogo2 == false){
67			ts = owl.parent('.top-slider').find('.scrollbar-slider div.active');
68			ts.removeClass('active')
69			ts.prev().addClass('active')
70			if($(this).hasClass('disabled')) {
71				nogo2 = true;
72			} else {
73				nogo2 = false;
74			}
75		}
76		nogo = false;
77	});
78	
79	
80	/*Новости*/
81	var owl2 = $('.news-tabs');
82	owl2.owlCarousel({
83		loop:true,
84		nav:true,
85		dots: true,
86		touchDrag: true,
87		pullDrag: true,
88		autoplay: false,
89		autoWidth: true,
90		margin:0,
91		items:1
92	});
93	
94	owl2.on('mousewheel', '.owl-stage', function (e) {
95		if (e.deltaY<0) {
96			owl2.trigger('next.owl');
97		} else {
98			owl2.trigger('prev.owl');
99		}
100		e.preventDefault();
101	});
102	
103	owl2.on('click', '.owl-item', function(e) {
104		const carousel = $('.news-tabs').data('owl.carousel');
105		carousel.to(carousel.relative($(this).index()), false, true);
106	});
107	
108	owl2.on('changed.owl.carousel', function(q) {
109		ntek = $('.news-tabs .owl-dot.active').index()+1;
110		console.log(ntek);
111			$('.news-cont').removeClass('active');
112			$('.news-cont:nth-child('+ntek+')').addClass('active');		
113	});
114	
115	$(".short-news-wrap").mCustomScrollbar({
116		axis:"y",
117		contentTouchScroll: true,
118		documentTouchScroll: true,
119		moveDragger:true,
120	});
121	
122	$('.tene').click(function () {
123		$('.nmt-select').slideToggle(300);
124	});
125	$('.nmt-select span').click(function () {
126		$('.nmt-select').slideToggle(300);
127		ntek = $(this).index()+1;
128		console.log(ntek);
129		$('.news-cont').removeClass('active');
130		$('.news-cont:nth-child('+ntek+')').addClass('active');		
131	});
132	
133	
134	/*News-list*/
135    var owl3 = $('.news-tabs-inl');
136	owl3.owlCarousel({
137		loop:false,
138		nav:true,
139		center:false,
140		dots: true,
141		touchDrag: true,
142		pullDrag: true,
143		autoplay: false,
144		autoWidth: true,
145		margin:0,
146		items:1
147	});
148
149	/*setTimeOut(function(){*/
150		//console.clear();
151        var tekslid = ($('.news-tabs-inl').attr('data-num'));
152		console.log(tekslid);
153        owl3.trigger('to.owl.carousel', tekslid); 
154	/*},1500)*/
155	
156	owl3.on('mousewheel', '.owl-stage', function (e) {
157		if (e.deltaY<0) {
158			owl3.trigger('next.owl');
159		} else {
160			owl3.trigger('prev.owl');
161		}
162		e.preventDefault();
163	});
164	
165    /*Слайдер галлереи*/
166    
167    if($('.gallery-slides').length > 0){
168	var owl4 = $('.gallery-slides');
169	owl4.owlCarousel({
170		loop:false,
171		nav:true,
172		dots: true,
173		touchDrag: true,
174		pullDrag: true,
175		autoplay: false,
176		autoWidth: true,
177		margin: 16,
178		items:1,
179        responsive: {
180			0: {
181				margin: 8,
182			},
183			680: {
184				margin: 16
185			}
186		}
187	});
188	
189	var lens = $('.gallery-slides .owl-dot').length+1;
190	tepro = 100 / lens;
191	razko = 3;
192	if($(window).width() <= 1010){
193		razko = 2;
194	}
195	if($(window).width() <= 680){
196		razko = 2;
197	}
198	
199	$('.gallery-slides + .scrollbar-slider div').css('width', tepro*razko+'%')
200	
201    
202    
203	owl4.on('changed.owl.carousel', function(q) {
204		ntek = $('.gallery-slides .owl-dot.active').index()+razko;
205		tepro2 = ntek * tepro;
206		$('.gallery-slides + .scrollbar-slider div').css('width', tepro2+'%')
207		
208	});
209	
210	var nogo = false;
211	var nogo2 = true;
212	
213	$('.gallery-slides .owl-next').click(function () {
214		ts = $('.scrollbar-slider div.active');
215		if(nogo == false){
216			ts = $('.scrollbar-slider div.active');
217			ts.removeClass('active')
218			ts.next().addClass('active')
219			if($(this).hasClass('disabled')) {
220				nogo = true;
221			} else {
222				nogo = false;
223			}
224			nogo2 = false;
225		}
226	});
227	
228	$('.gallery-slides .owl-prev').click(function () {
229		ts = $('.scrollbar-slider div.active');
230		if(nogo2 == false){
231			ts = $('.scrollbar-slider div.active');
232			ts.removeClass('active')
233			ts.prev().addClass('active')
234			if($(this).hasClass('disabled')) {
235				nogo2 = true;
236			} else {
237				nogo2 = false;
238			}
239		}
240		nogo = false;
241	});
242    
243    $('.gallery-slides').magnificPopup({
244		delegate: 'a',
245		type: 'image',
246		tLoading: 'Загрузка изображения #%curr%...',
247		mainClass: 'mfp-tat',
248		gallery: {
249			enabled: true,
250            tCounter: '%curr% из %total%',
251			navigateByImgClick: true,
252			preload: [0,1]
253		},
254		image: {
255			tError: '<a href="%url%">Изображение #%curr%</a> не может быть загружено.',
256		},
257		zoom: {
258			enabled: true,
259			duration: 300, // don't foget to change the duration also in CSS
260			opener: function(element) {
261				return element.find('img');
262			}
263		}
264	});
265    }
266    
267});

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.