PageSourceSearch

https://www.outdoors.org/app/themes/amc/js/custom.js?ver=1.9.1

js outdoors.org collected 2026-09-24 08:37:17 UTC 8,057 bytes, 250 lines download raw bytes

1//* Genesis responsive menu classes
2var genesis_responsive_menu = {"mainMenu":"Menu","menuIconClass":"dashicons-icon dashicons-menu","subMenu":"Submenu","subMenuIconClass":"dashicons-icon dashicons-arrow-down-alt2","menuClasses":{"others":[".nav-primary, .nav-header"]}};
3
4jQuery( document ).ready( function( $ ) {
5	
6	//* GDPR cookies by YES plugin tabindex
7	$('a.cli-privacy-readmore').attr('tabindex', '-1');
8	$('a#wt-cli-privacy-save-btn').attr('tabindex', '-1');
9	$('button#cliModalClose').attr('tabindex', '-1');
10	$('.cli-tab-section .cli-tab-header a').attr('tabindex', '-1');
11
12	//* Parent Menus with dropdown now can be clicked and go to its location
13	if ( ($(window).width() > 980) && $(window).width() < 1100) {
14		$(".genesis-nav-menu > .menu-item > a").click(function () {
15			window.location = $(this).attr('href');
16			return false;
17		});
18	}
19	
20	//* Add sticky class to body on page scroll
21	if ($(window).width() > 980) {
22		$(window).scroll(function() {
23			if ($(this).scrollTop() > 0){  
24				$('body').addClass("sticky");
25			} else {
26				$('body').removeClass("sticky");
27			}
28		});
29		
30	}
31	
32	/* ------------ Fixed SiteOrigin tabs and accordion accessibility issues ------------ */
33	
34	//* Come to SO "Tabs" by pressing the Tab button
35	$(".sow-tabs-tab").attr("tabindex","0");
36	$('.sow-tabs-tab').click(function(){
37		setTimeout( function(){ 
38			$(".sow-tabs-tab").attr("tabindex","0");
39		}, 500 );
40	});
41	//* Open the SO tab by pressing Enter.
42	$('.sow-tabs-tab').keypress(function(e){  
43		var key = e.which;
44		if(key == 13) {
45			$(this).trigger('click');  
46			$(".sow-tabs-tab").attr("tabindex","0");
47		}
48	});
49	//* Set SO tabs title image "alt" tag
50	$(".sow-tabs-title").each(function(){
51		$(this).find("img").wrap('<span class="tab-icon"></span>');
52		$(this.lastChild).wrap('<span class="tab-title"></span>');
53		var tab_title = $('.tab-title').text();
54		$(this).find("img").attr("alt", tab_title);
55	});
56	//* Set SO accordion title image "alt" tag
57	$(".sow-accordion-title").each(function(){
58		var accordion_title = $(this).text();
59		$(this).find("img").attr("alt", accordion_title);
60	});
61
62	// Flyout Search Bar
63	$( document ).on( "click", ".search-toggle", function() {
64		$( ".search-container" ).slideToggle( "slow", function() {
65			$( ".search-toggle" ).toggleClass( "active" );
66		});
67	});
68	
69	//expand background image with screensize
70	function resize_window() {
71		setTimeout(function() {
72			$(".touch-screen-corner").each(function(){
73				var window_width = $(window).width();
74				var wrapWidth =  $(this).parents(".panel-row-style").width();
75				var incWidth = $(this).width();
76				var remaining_width = (window_width - wrapWidth) / 2;
77				var add_width = remaining_width + incWidth + 0.5;
78				
79				$(this).find(".panel-grid").css("width",add_width+"px");
80				
81				if($(this).hasClass("touch-from-left")){
82					$(this).find(".panel-grid").css("marginLeft","-"+remaining_width+"px");
83				}else {
84				}
85			});
86		}, 1000);
87	}
88	resize_window();
89	$(window).resize( function() { resize_window() } );
90	
91	
92	$("#page-container .header-widget-area .widget_sow-editor, .search-container").clone().insertAfter(".nav-header > .menu");
93	$('.widget_nav_menu .header-flyout-search [for="searchform-1"]').attr("for", "searchform-2");
94	$('.widget_nav_menu .header-flyout-search [id="searchform-1"]').attr("id", "searchform-2");
95	
96	/* tabs to accordions */
97	if ( $( ".sow-tabs" )[0] ) {
98		var tabs_title = "";
99		$( ".sow-tabs-tab" ).each( function() {
100			tabs_title = [];
101			tabs_title = $( ".sow-tabs-tab" )
102				.map( function() {
103				return $( this ).html();
104			})
105				.get();
106		});
107		$( ".sow-tabs-panel" ).each( function( i ) {
108			$( this ).prepend( '<div class="mobile-tab-title">' + tabs_title[i] + "</div>" );
109		});
110		$( document ).on( "click", ".mobile-tab-title", function( e ) {
111			e.preventDefault();
112			var $this = $( this );
113			if ( $this.hasClass( "show" ) ) {
114				$this.removeClass( "show" );
115			}
116			else {
117				$this.addClass( "show" );
118			}
119		});
120		$(".sow-tabs-panel:first-child .mobile-tab-title").addClass("show");
121	}
122	
123	
124	$('table').wrap('<div class="table-container"></div>');
125	
126	jQuery( document ).on( "change", "#dept-select", function() {
127		var postID = jQuery(this).val();
128		jQuery(".department-item").hide().removeClass("active");
129		//jQuery("."+postID).show().addClass("active");
130		jQuery("."+postID).css('display', 'flex').addClass("active");
131	});
132	
133	$(".sow-accordion-title .sow-icon-fontawesome").parents(".sow-accordion-panel").hide();
134	
135	/*
136	$('.default-select').click(function() {
137		alert('ddd');
138		$(this).parent().toggleClass('active');
139		$(this).next().slideToggle(200);
140	});*/
141	
142	$(".timeline-row").each(function(){
143		//Tinyslider
144		if ($(window).width() > 780) {
145			var slider = tns({
146				container: '.timeline-slider-row',
147				items: 4,
148				gutter: 0,
149				//loop: true,
150				rewind: true,
151				autoplayButtonOutput: false,
152				//controls: false,
153				//slideBy: 'page',
154				nav: false,
155				animateDelay: 5000,
156				controlsPosition: "bottom",
157				//navPosition: 'bottom',
158				speed: 1000,
159				mouseDrag: true,
160				responsive: {
161					1: {
162						items: 1,
163					},
164					450: {
165						items: 2,
166					},
167					768: {
168						items: 3,
169					},
170					980: {
171						items: 4,
172					}
173				}
174			});
175		}
176	});
177	
178	//wrap all child elements in one div next untill different class
179	$('.form-box-style .gform_fields .gfield:not(".gsection")').addClass('single-field');
180	setTimeout(function() {
181		$('.form-box-style .gform_fields').find('.single-field').each(function() {
182			if ( !jQuery(this).prev().hasClass( "single-field" )) {
183				var matches = jQuery(this).prev().nextUntil(".gsection");
184				matches.wrapAll('<div class="fields-wrap"></div>');
185			}
186		});
187	}, 1000);
188	
189	// Flyout Search Bar
190	$(".support-popup-btn").click(function(event){
191		event.preventDefault();
192	});
193	$( document ).on( "click", ".support-popup-btn,.close-support-popup", function() {
194		$( "#support-popup" ).slideToggle( "slow", function() {
195			$( ".support-popup-btn" ).toggleClass( "active" );
196		});
197	});
198	//* Open the SO tab by pressing Enter.
199	$('.support-popup-btn,.close-support-popup').keypress(function(e){  
200		var key = e.which;
201		if(key == 13) {
202			$(this).trigger('click');  
203		}
204	});
205	
206	$('.touch-screen-corner').parents('.panel-grid').find('.panel-grid-cell').addClass('gap-none');
207
208});
209
210//* Fixed "Missing form label" accessibility error for recaptcha
211jQuery( window ).on( "load", function() {
212	jQuery( ".g-recaptcha-response" ).each(function() {
213		jQuery( this ).attr( "aria-hidden", "true" );
214		jQuery( this ).attr( "aria-label", "do not use" );
215		jQuery( this ).attr( "aria-readonly", "true" );
216	});
217	
218	jQuery('.menu-toggle').wrapInner('<span class="menu-btn-text"></span>');
219	
220	jQuery( '#fancybox-wrap' ).removeAttr( "aria-hidden" );
221	jQuery( '#fancybox-wrap' ).removeAttr( "aria-labelledby" );
222	
223	setTimeout(function() {
224		jQuery( 'guestdesk .modal' ).removeAttr( "aria-hidden" );
225		jQuery( 'guestdesk .modal' ).removeAttr( "aria-labelledby" );
226	}, 1000);
227	
228	jQuery( '.gfield_label:empty' ).text('label');
229	
230	jQuery( '.gfcnp_echeck_complex input, .gfield td input:not([type="radio"])' ).each(function() {
231		var gf_assib_input_id = jQuery(this).attr("id");
232		jQuery(this).before( '<label class="screen-reader-text" for="'+gf_assib_input_id+'">Field</label>' );
233	});
234	jQuery( '.gfield tr' ).each(function() {
235		var gf_radio_input_id = jQuery(this).find('input[type="radio"]').attr("id");
236		jQuery(this).before( '<label class="screen-reader-text" for="'+gf_radio_input_id+'">Field</label>' );
237	});
238	jQuery( '.gfcnp_formmode' ).each(function() {
239		var gfcnp_input_id = jQuery(this).find('input').attr("id");
240		jQuery(this).before( '<label class="screen-reader-text" for="'+gfcnp_input_id+'">Field</label>' );
241	});
242	jQuery( '.gfield .gfcnp_echeck_complex select, .gfield td select, .gfcnp_formmode select' ).each(function() {
243		var gfcnp_select_id = jQuery(this).attr("id");
244		jQuery(this).before( '<label class="screen-reader-text" for="'+gfcnp_select_id+'">Field</label>' );
245	});
246	
247	jQuery( '.ginput_container_creditcard #input_27_10_1_label' ).remove();
248	
249	
250});

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.