PageSourceSearch

https://www.ppcseagles.org/pro/themes/zenith/js/custom.js

js ppcseagles.org collected 2026-10-02 08:47:19 UTC 3,724 bytes, 88 lines download raw bytes

1// Custom JS for Westbend
2
3// Drop Nav
4$('#topnav').children('li').each(function(){
5	var leftpos = $(this).offset().left;
6	var itemwidth = $(this).width();
7	var itempos = leftpos + itemwidth;
8	
9	var windowwidth = $(window).innerWidth();
10	
11	var rightdistance = windowwidth - itempos;
12	
13	if ( rightdistance < 540) {
14		$(this).addClass('right_drop');
15	}
16});
17
18$(window).resize(function(){
19	$('#topnav').children('li').each(function(){
20		var leftpos = $(this).offset().left;
21		var itemwidth = $(this).width();
22		var itempos = leftpos + itemwidth;
23		
24		var windowwidth = $(window).innerWidth();
25		
26		var rightdistance = windowwidth - itempos;
27		
28		if ( rightdistance < 540) {
29			$(this).addClass('right_drop');
30		} else {
31			$(this).removeClass('right_drop');
32		}
33	});
34});
35
36// Flyout arrows
37if ( $(window).innerWidth() >= 1200 ){
38	$('.drop_level2_wrapper .drop1_haschildren').append('<span class="flyout_arrow"><svg width="18px" height="28px" viewBox="0 0 18 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g transform="matrix(0.0871301,0,0,0.0871301,-2.15647,-8.30531)"><path d="M224.3,273L88.3,409C78.9,418.4 63.7,418.4 54.4,409L31.8,386.4C22.4,377 22.4,361.8 31.8,352.5L128.2,256.1L31.8,159.7C22.4,150.3 22.4,135.1 31.8,125.8L54.3,103C63.7,93.6 78.9,93.6 88.2,103L224.2,239C233.7,248.4 233.7,263.6 224.3,273Z" style="fill-rule:nonzero;"/></g></svg></span>');
39	$('#inside_nav #menu [class^="has_children"]').append('<span class="flyout_arrow"><svg width="18px" height="28px" viewBox="0 0 18 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g transform="matrix(0.0871301,0,0,0.0871301,-2.15647,-8.30531)"><path d="M224.3,273L88.3,409C78.9,418.4 63.7,418.4 54.4,409L31.8,386.4C22.4,377 22.4,361.8 31.8,352.5L128.2,256.1L31.8,159.7C22.4,150.3 22.4,135.1 31.8,125.8L54.3,103C63.7,93.6 78.9,93.6 88.2,103L224.2,239C233.7,248.4 233.7,263.6 224.3,273Z" style="fill-rule:nonzero;"/></g></svg></span>');
40}
41
42// Desktop Search
43$('.header_search_icon').click(function(){
44	$('.header_search_form_container').toggleClass('open');
45});
46
47// Close search on nav item hover
48$('.nav-item').hover(function(){
49	$('.header_search_form_container').removeClass('open');
50});
51
52
53
54// mobile togglemenu
55$('.togglemenu').click(function(){
56	$('html').toggleClass('open_nav');
57	$('.nav_panel').toggleClass('open');
58});
59
60
61// move search to nav panel on mobile
62if ( $(window).innerWidth() < 1100 ) {
63	var searchform = $('.header_search_form_container').clone();
64	$('.mobile_search_container').append(searchform);
65}
66
67// Mobile Sub nav toggle
68$('.subnav_toggle').click(function(){
69	$(this).toggleClass('open');
70	$(this).parent().children('.drop_level2_wrapper').slideToggle();
71	$(this).parent().siblings().children('.drop_level2_wrapper').slideUp();
72	$(this).parent().siblings().children('.subnav_toggle').removeClass('open');
73});
74
75// Inside page menu nav toggle
76$('#menu [class^="has_children"] .flyout_arrow').click(function(){
77	$(this).toggleClass('turn_icon');
78	$(this).parent().children('ul').slideToggle();
79	$(this).parent().siblings().children('ul').slideUp();
80	$(this).parent().siblings().children('ul').removeClass('turn_icon');
81});
82
83// nav panel max height (there is CSS in place as fallback)
84if ( $(window).innerWidth() < 1100 ) {
85	var windowheight = $(window).innerHeight();
86	var maxheight = windowheight - 50;
87	$('.nav_panel_content').css('max-height', maxheight);
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.