PageSourceSearch

https://demo1.event.net.ua/js/frontend.js

js event.net.ua collected 2026-09-28 05:48:41 UTC 3,150 bytes, 101 lines download raw bytes

1$(document).ready(function() {
2	var isiPhone = (navigator.userAgent.match(/iPhone/i) != null);
3	var attrIphone = $("#js_section").attr('data-safari');
4	if(isiPhone) {
5		$("#js_section").attr("style", attrIphone);
6	}
7	
8/* При прокрутке вниз появляется кнопка наверх*/
9	$(window).scroll(function() {
10		if($(this).scrollTop() > 400) {
11			$('#toTop').fadeIn();
12		} else {
13			$('#toTop').fadeOut();
14		}
15	});
16	$('#toTop').click(function() {
17		$('body,html').animate({scrollTop:0},800);
18	});
19	var $menu = $("#menu");
20	$(window).scroll(function(){
21		if ( $(this).scrollTop() > 50 && $menu.hasClass("menu-default") ) {
22			$menu.removeClass("menu-default").addClass("menu-fixed");
23		} else if($(this).scrollTop() <= 50 && $menu.hasClass("menu-fixed")) {
24			$menu.removeClass("menu-fixed").addClass("menu-default");
25		}
26	});
27 });
28
29$(document).on('click',".js_copy2clipboard",function() {
30	var texte = $(this).attr('data-copy');
31	copy2clipboard(texte);
32});
33
34// скрытие/открытие блока
35// при нажатии на .js_toggle показывается элемент, указанный в атрибуте 'data-elem'
36// при повторном нажати на .js_toggle или на любой другой элемент - блок закрывается
37// исключение! клик на .js_float_action обрабатывается как и должен, без закрытия открытого окна
38
39$(document).on('click',".js_toggle",function(event) {
40	event.preventDefault();
41	var elem = $(this).attr('data-elem');
42	$(elem).toggle(); 
43	//$('.js_toggle').show(); 
44	$(this).toggle();
45});
46
47$(document).on("click",".js_float",function(){
48	var elem = $(this).attr('data-elem');
49	$(elem).toggle();
50
51	$("body").on("click.float", function(event) {
52		if($(event.target).hasClass("js_float_target"))	{
53			$("body").off('click.float');
54		} else if($(event.target).hasClass("js_float_action")){
55		}else {
56			event.stopImmediatePropagation();
57			$("body").off('click.float');
58			$(elem).toggle();
59			return false;
60		}
61	});
62});
63//конец скрытия/открытия блоков
64
65//обрезание заголовков
66$(function() {
67	(function cropTitle() {
68		$(".list-events-title-wrapper").each(function() {
69      			var $title = $(this).find("p");
70      			while ($title.height() > $(this).height()) {
71        			$title.text($title.text().split(" ").slice(0, $title.text().split(" ").length - 1).join(" ") + "...");
72      			}
73    		});
74  	})();
75});
76
77//конец обрезания заголовков
78
79function copy2clipboard(txt) {
80	txt = document.createTextNode(txt);
81	var m = document;
82	var w = window;
83	var b = m.body;
84	b.appendChild(txt);
85
86	if (b.createTextRange) {
87		var d = b.createTextRange();
88		d.moveToElementText(txt);
89		d.select();
90		m.execCommand('copy');
91	} else {
92		var d = m.createRange();
93		var g = w.getSelection;
94		d.selectNodeContents(txt);
95		g().removeAllRanges();
96		g().addRange(d);
97		m.execCommand('copy');
98		g().removeAllRanges();
99	}
100	txt.remove();
101}

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.