PageSourceSearch

https://www.hipenhotmagazine.nl/wp-content/themes/bard/assets/js/custom-scripts.js?ver=6.9

js hipenhotmagazine.nl collected 2026-09-27 14:38:53 UTC 5,097 bytes, 210 lines download raw bytes

1$ = jQuery;
2
3jQuery(document).ready(function( $ ) {
4	"use strict";
5
6/*
7** Header Image =====
8*/
9	var entryHeader = $('.entry-header');
10	
11	// Parallax Effect
12	if ( entryHeader.attr('data-parallax') == '1' ) {
13		entryHeader.parallax({ imageSrc: entryHeader.attr('data-image') });
14	}
15
16/*
17** Main Navigation =====
18*/
19	// Navigation Hover
20	$('#top-menu, #main-menu').find('li').on('mouseenter', function() {
21		$(this).children('.sub-menu').stop().fadeIn( 200 );
22	}).on('mouseleave', function() {
23		$(this).children('.sub-menu').stop().fadeOut( 200 );
24	});
25
26	// Mobile Menu
27	$('.mobile-menu-btn').on( 'click', function() {
28		$('.mobile-menu-container').slideToggle();
29	});
30
31	// Responsive Menu 
32	$( '#mobile-menu .menu-item-has-children' ).prepend( '<div class="sub-menu-btn"></div>' );
33	$( '#mobile-menu .sub-menu' ).before( '<span class="sub-menu-btn-icon icon-angle-down"></span>' );
34
35	// Responsive sub-menu btn
36	$('.sub-menu-btn').on( 'click', function(){
37		$(this).closest('li').children('.sub-menu').slideToggle();
38		$(this).closest('li').children('.sub-menu-btn-icon').toggleClass( 'fa-rotate-270' );
39	});
40
41	$( window ).on( 'resize', function() {
42		if ( $('.main-menu-container').css('display') === 'block' ) {
43			$( '.mobile-menu-container' ).css({ 'display' : 'none' });
44		}
45	});
46
47	// Search Form
48	$('.main-nav-icons').after($('.main-nav-search #searchform').remove());
49	var mainNavSearch = $('#main-nav #searchform');
50	
51	mainNavSearch.find('#s').attr( 'placeholder', mainNavSearch.find('#s').data('placeholder') );
52
53	$('.main-nav-search').on( 'click', function() {
54		if ( mainNavSearch.css('display') === 'none' ) {
55			mainNavSearch.fadeIn();
56			$('.main-nav-search i:last-of-type').show();
57			$('.main-nav-search i:first-of-type').hide();
58		} else {
59			mainNavSearch.fadeOut();
60			$('.main-nav-search i:last-of-type').hide();
61			$('.main-nav-search i:first-of-type').show();
62		}
63	});
64
65
66/*
67** Featured Slider =====
68*/
69	var RTL = false;
70	if( $('html').attr('dir') == 'rtl' ) {
71	RTL = true;
72	}
73
74	$('#featured-slider').slick({
75		prevArrow: '<span class="prev-arrow icon-angle-left"></span>',
76		nextArrow: '<span class="next-arrow icon-angle-right"></span>',
77		dotsClass: 'slider-dots',
78		adaptiveHeight: true,
79		rtl: RTL,
80		speed: 750,
81  		customPaging: function(slider, i) {
82            return '';
83        }
84	});
85
86
87/*
88** Sidebars =====
89*/
90
91	// Sidebar Alt Scroll
92	$('.sidebar-alt').perfectScrollbar({
93		suppressScrollX : true,
94		includePadding : true,
95		wheelSpeed: 3.5
96	});
97
98	// Sidebar Alt
99	$('.main-nav-sidebar').on('click', function () {
100		$('.sidebar-alt').css( 'left','0' );
101		$('.sidebar-alt-close').fadeIn( 500 );
102	});
103
104	// Sidebar Alt Close
105	function bardAltSidebarClose() {
106		var leftPosition = parseInt( $( ".sidebar-alt" ).outerWidth(), 10 ) + 30;
107		$('.sidebar-alt').css( 'left','-'+ leftPosition +'px' );
108		$('.sidebar-alt-close').fadeOut( 500 );
109	}
110	
111	$('.sidebar-alt-close, .sidebar-alt-close-btn').on('click', function () {
112		bardAltSidebarClose();
113	});
114
115	// Instagram Columns
116	var instagram = $( '.footer-instagram-widget .null-instagram-feed li a' ),
117	instagramColumn = $( '.footer-instagram-widget .null-instagram-feed li' ).length;
118	instagram.css({
119		 'width'	: '' + 100 / instagramColumn +'%',
120		 'opacity'	: '1'
121	});
122
123/*
124** Scroll Top Button =====
125*/
126
127	$('.scrolltop').on( 'click', function() {
128		$('html, body').animate( { scrollTop : 0 }, 800 );
129		return false;
130	});
131
132
133/*
134** Window Resize =====
135*/
136
137	$( window ).on( 'resize', function() {
138
139		if ( $('.mobile-menu-btn').css('display') === 'none' ) {
140			$( '.mobile-menu-container' ).css({ 'display' : 'none' });
141		}
142		
143		bardstickySidebar();
144		bardAltSidebarClose();
145	});
146
147
148/*
149** Run Functions =====
150*/
151	// FitVids
152	$('.slider-item, .post-media').fitVids();
153
154
155
156}); // end dom ready
157
158
159/*
160** Window Load =====
161*/
162
163	$( window ).on( 'load', function() {
164		bardstickySidebar();
165		bardPreloader();
166	});
167
168
169/*
170** Global Functions =====
171*/
172	// Preloader
173	function bardPreloader() {
174		if ( $('.bard-preloader-wrap').length ) {
175
176			setTimeout(function(){
177				$('.bard-preloader-wrap > div').fadeOut( 600 );
178				$('.bard-preloader-wrap').fadeOut( 1500 );
179			}, 300);
180
181			if ( $('body').hasClass('elementor-editor-active') ) {
182				setTimeout(function(){
183					$('.bard-preloader-wrap > div').fadeOut( 600 );
184					$('.bard-preloader-wrap').fadeOut( 1500 );
185				}, 300);
186			}
187
188		}
189	}
190
191	// Sticky Sidebar
192	function bardstickySidebar() {
193		if ( $( '.main-content' ).data('sidebar-sticky') === 1 ) {		
194			var SidebarOffset = 0;
195
196			if ( $("#main-nav").attr( 'data-fixed' ) === '1' ) {
197				SidebarOffset = 40;
198			}
199
200			$('.sidebar-left,.sidebar-right').stick_in_parent({
201				parent: ".main-content",
202				offset_top: SidebarOffset,
203				spacer: '.sidebar-left-wrap,.sidebar-right-wrap'
204			});
205
206			if ( $('.mobile-menu-btn').css('display') !== 'none' ) {
207				$('.sidebar-left,.sidebar-right').trigger("sticky_kit:detach");
208			}
209		}
210	}

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.