PageSourceSearch

http://nnov-airport.ru/js/functions.js

js nnov-airport.ru collected 2026-09-24 22:19:42 UTC 1,803 bytes, 82 lines download raw bytes

1function initSlider(width) {
2	var $slider = $('.popular__list'),
3			itemsNum = $slider.children('li').length,
4			sliderInited = false,
5			w;
6
7	function buildSlider() {
8		// extrasmall devices
9		if(w <= width && !sliderInited) {
10			$slider.owlCarousel({
11				loop: false,
12	      margin: 0,
13	      nav: true,
14	      navText: ['<svg class="icon-arrow"><use xlink:href="#arrow" /></svg>', '<svg class="icon-arrow"><use xlink:href="#arrow" /></svg>'],
15	      dots: false,
16	      items: 1,
17	      responsiveClass: true,
18	      navRewind: false,
19	      onInitialized: function() {
20	      	sliderInited = true;
21	      },
22	      responsive: {
23	      	'580': {
24	      		items: 2
25	      	}
26	      }
27			});
28		} else if(w > width && sliderInited) {
29			$slider.trigger('destroy.owl.carousel').removeClass('owl-carousel owl-loaded');
30			$slider.find('.owl-stage-outer').children().unwrap();
31			sliderInited = false;
32		}
33	}
34	
35	if($slider.length) {
36		w = window.innerWidth;
37		buildSlider();
38
39		$(window).on('resize', function() {
40			w = window.innerWidth;
41			buildSlider();
42		});
43	}
44}
45
46function bgLazyLoad() {
47	var bLazy = new Blazy({
48		selector: '.b-lazy',
49		offset: 100
50	});
51}
52
53function fixHeight() {
54	var $subtitle = $('.present .subtitle'),
55			h = $(window).height(),
56			defMargin;
57	function setMargin() {
58		if(h <= 769 && h >= 600) {
59			var newMargin = h*0.033+"px";
60			$subtitle.css({'margin-bottom': newMargin});
61			console.log('not def')
62		} else {
63			$subtitle.css({'margin-bottom': defMargin});
64			console.log('def')
65		}
66	}
67	if($subtitle.length) {
68		defMargin = $subtitle.css('margin-bottom');
69		console.log(defMargin);
70		setMargin();
71		$(window).on('resize', function() {
72			h = $(window).height();
73			setMargin();
74		})
75	}
76}
77
78$(document).ready(function() {
79	initSlider(767);
80	bgLazyLoad();
81	// fixHeight();
82});

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.