PageSourceSearch

https://www.von-poll.nl/layouts/main/javascript/menu.js

js von-poll.nl collected 2026-10-04 21:04:37 UTC 2,248 bytes, 88 lines download raw bytes

1$(document).ready(function () {
2	"use strict";
3
4	// var threshold = 250;
5	var offsetTop = 100;
6
7	var navbar = $("header");
8	var startScroll = $(window).scrollTop();
9	// var deltaScroll = 0;
10
11	toggleIsTop(startScroll, offsetTop);
12
13	$(window).scroll(function () {
14		var currentScroll = $(window).scrollTop();
15		// var navbarHeight = navbar.height();
16
17		toggleIsTop(currentScroll, offsetTop);
18
19		// if (deltaScroll < currentScroll && currentScroll > navbarHeight + navbarHeight) {
20		//     if (currentScroll > (startScroll + threshold)) {
21		//         navbar.addClass("is-scrolled");
22		//         startScroll = currentScroll;
23		//     }
24		// } else if (deltaScroll > currentScroll && !(currentScroll <= navbarHeight)) {
25		//     if ((startScroll - threshold) > currentScroll) {
26		//         navbar.removeClass("is-scrolled");
27		//         startScroll = currentScroll;
28		//     }
29		// }
30		// deltaScroll = currentScroll;
31	});
32
33	function toggleIsTop(currentScroll, offsetTop) {
34		if (currentScroll > offsetTop) {
35			navbar.addClass("is-not-top");
36		} else {
37			navbar.removeClass("is-not-top");
38			navbar.removeClass("is-scrolled");
39		}
40	}
41
42	$(".close-button, .menu-button, .menu-backdrop").click(function () {
43		toggleMenu();
44	});
45
46	function toggleMenu() {
47		$(".menu-container").toggleClass("active");
48		$("body").toggleClass("isMenu");
49	}
50
51	$(document).keydown(function (e) {
52		if (e.key === "Escape" && $(".menu-container").hasClass("active")) {
53			toggleMenu();
54		}
55	});
56
57	$("ul.menu a").each(function () {
58		var url = $(this).attr("href");
59		$(this).attr("href", url.replace("%", "#"));
60	});
61
62	var container = $("body");
63	container.addClass("is-loaded");
64	setTimeout(function () {
65		container.addClass("intro-animated");
66	}, 500);
67});
68
69$(document).ready(function () {
70	var videos = $(".social-card video");
71	function autoPlay() {
72		if ($(window).width() >= 830) {
73			$(videos).each(function () {
74				$(this).attr("autoplay", "autoplay");
75				$(this)[0].play();
76			});
77		} else {
78			$(videos).each(function () {
79				$(this).removeAttr("autoplay");
80				$(this)[0].pause();
81			});
82		}
83	}
84	autoPlay();
85	$(window).on("resize", function () {
86		autoPlay();
87	});
88});

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.