PageSourceSearch

https://www.susanjacobphd.com/themes/website/assets/js/theme.js?v.d7b5a5

js susanjacobphd.com collected 2026-10-08 10:46:03 UTC 3,579 bytes, 106 lines download raw bytes

1$(document).ready(function () {
2	$('.preview_iframe').height($(window).height());
3
4	/// navigation functionality
5		var menu = $('#navigation_header'),
6		menuParent = menu.parent(),
7		menuList = menu.find('ul'),
8		subnavClass = 'sublevel-';
9
10	// loop through main navigation, define if there are any sub-levels and wrap into container with corresponding class name
11	// the function is needed because mmenu doesn't provide this functionality, and we need it to style sub-levels differently, with their own color schemes
12	navigationSublevelWrap(menuList, subnavClass);
13
14		// mobile navigation
15	menu.clone().attr('id', 'navigation--mobile').mmenu({
16		extensions: [
17			'multiline',
18			'border-full',
19			'pagedim-black'
20		],
21		offCanvas: {
22			zposition: 'front'
23		}
24	});
25
26	// desktop navigation
27	menu.mmenu({
28		offCanvas: false,
29		extensions: [
30			'multiline',
31			'border-full',
32			'fullscreen'
33		]
34	});
35	
36	// custom functionality for mmenu
37	if($('#navigation--mobile').length) {
38		var mmenuCloseBtn = $('<a href="#" class="mm-btn mm-close">'),
39			mmenuAPI = $("#navigation--mobile").data( "mmenu" );
40
41		// add close button for mmenu
42		$('#navigation--mobile .mm-panels .mm-panel:first-child .mm-navbar').prepend(mmenuCloseBtn);
43		// close mmenu on button click
44		mmenuCloseBtn.click(function(e) {
45			e.preventDefault();
46			mmenuAPI.close();
47		});
48	}
49	
50	var hamburgerBtn = $('#hamburger'),
51		navHeader= $('.wrap__navigationHeader');
52	
53	hamburgerBtn.on('click', function (e) {
54		e.preventDefault();
55		navHeader.toggleClass('wrap__navigationHeader--active');
56	});
57	
58	// hide wrap__navigationHeader on click outside
59	$(document).on('click touchstart', function(e){
60		var target = $(e.target);
61
62		if (!target.is(navHeader) && !target.closest(navHeader).length && !target.is(hamburgerBtn) && !target.closest(hamburgerBtn).length) {
63			navHeader.removeClass('wrap__navigationHeader--active');
64		}
65	});
66
67	
68	// move image from bx-slider LI, as we need to move image itself with transition. Because background-position + relative/absolute breaks in Chrome on resize
69	// NOTE: special conditional (!$('.wrap__slider').hasClass('text-only') && !!$('.slider__image').length && !!$('.slider__image').css('background-image').length) is required,
70	// because in the theme there's a variation of text-only slider, it doesn't require images
71	// In common situations use only this conditional (!!$('.slider__image').length && !!$('.slider__image').css('background-image').length)
72	if(!$('.wrap__slider').hasClass('text-only') && !!$('.slider__image').length && !!$('.slider__image').css('background-image').length) {
73		if(!$('.slider__image--fixed').length) {
74			$('.slider__image').each(function(){
75				var imgHolder = $(this),
76					img = imgHolder.css('background-image').replace(/(url\(|\)|'|")/gi, '');
77
78				$(this).css('background-image', 'none');
79				imgHolder.append('<div class="slider__image--fixed" style="background-image: url(' + img + ')">');
80			});
81		}
82		
83		// set class if slider text area is empty
84		$('.slider__text').each(function() {
85			if(!$(this).children().length) {
86				$(this).addClass('empty');
87			}
88		});
89	}
90	
91	// handle layout resize
92	ResponsiveHelper.addRange({
93		'..767': {
94			on: function() {
95				// move sidebar-holder-top above main content 
96				$('.sidebar-holder-top').moveElement({
97					place: '.container-holder .content-holder',
98					move: 'before'
99				});
100			},
101			off: function() {
102				$('.sidebar-holder-top').data('moveElement').destroy();
103			}
104		}
105	});
106});

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.