PageSourceSearch

https://kindenheim.info/wp-content/themes/pukeko/assets/js/custom.js?ver=1.0

js kindenheim.info collected 2026-10-10 00:33:15 UTC 2,456 bytes, 90 lines download raw bytes

1/* global screenReaderText */
2/**
3 * File custom.js.
4
5	* @version 1.0.1
6 */
7
8( function( $ ) {
9
10	// Variables and DOM Caching.
11	var $body = $( 'body' ),
12	headerOffset,
13	menuTop = 0,
14	resizeTimer;
15
16	// Add Page Section CSS classes
17	$( '.fullwidth' )
18		.parents( '.elementor-widget-wp-widget-pukeko-product-widget' )
19				.addClass( 'is-fullwidth' );
20
21	$( '.fullscreen' )
22		.parents( '.elementor-widget-wp-widget-pukeko-product-widget' )
23				.addClass( 'is-fullscreen' );
24
25	// Toggle navigation
26	$( '#hamburger' ).on( 'click', function(){
27		$( 'body' ).toggleClass( 'mobilemenu-active' );
28	} );
29
30	// Add header video class after the video is loaded.
31	$( document ).on( 'wp-custom-header-video-loaded', function() {
32		$body.addClass( 'has-header-video' );
33	});
34
35
36	// Hide Header on on scroll down
37	var didScroll;
38	var lastScrollTop = 0;
39	var delta = 5;
40	var navbarHeight = $('#masthead').outerHeight();
41
42	$(window).scroll(function(event){
43			didScroll = true;
44	});
45
46	setInterval(function() {
47			if (didScroll) {
48					hasScrolled();
49					didScroll = false;
50			}
51	}, 250);
52
53	function hasScrolled() {
54			var st = $(this).scrollTop();
55
56			// Make sure they scroll more than delta
57			if(Math.abs(lastScrollTop - st) <= delta)
58					return;
59
60			// If they scrolled down and are past the navbar, add class .header-up.
61			// This is necessary so you never see what is "behind" the navbar.
62			if (st > lastScrollTop && st > navbarHeight){
63					// Scroll Down
64					$('#masthead').removeClass('header-down').addClass('header-up');
65			} else {
66					// Scroll Up
67					if(st + $(window).height() < $(document).height()) {
68							$('#masthead').removeClass('header-up').addClass('header-down');
69					}
70			}
71
72			lastScrollTop = st;
73	}
74
75	$('#nav-wrap a[href*=#]').click(function() {
76		var str = $(this).attr('href');
77		var from = window.location.href;
78		from = from.substring(0, from.lastIndexOf("/") + 1);
79		var rest = str.substring(0, str.lastIndexOf("/") + 1);
80		var last = str.substring(str.lastIndexOf("/") + 1, str.length);
81    if (rest == from) {
82        $( 'body' ).removeClass( 'mobilemenu-active' );
83				$(this).parent().parent().parent().find('.sub-menu').removeClass('toggled-on');
84				$(this).parent().parent().parent().find('.dropdown-toggle').removeClass('toggled-on').attr( 'aria-expanded', 'false' );
85				$(this).parent().parent().parent().removeClass('focus');
86				$(this).parent().parent().parent().unbind('mouseenter mouseleave');
87    }
88	});
89
90} )( jQuery );

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.