PageSourceSearch

https://www.netfcu.org/templates/NEteamsters_2025/js/jqueriness.js?version=20260924094224

js netfcu.org collected 2026-09-24 13:42:33 UTC 6,664 bytes, 282 lines download raw bytes

1$(document).ready(function(){
2
3
4// for pageinfo
5	var W = $( window ).width();
6	var H = $( window ).height();
7	$("#p1").text(W+' x '+H);
8
9	// on resizing
10	$( window ).resize(function() {
11		var W = $( window ).width();
12		var H = $( window ).height();
13		$("#p1").text(W+' x '+H);
14		close_dd();
15		if(W > 1200) {
16	        $("nav.mobile").slideDown('fast');
17		} else {
18	        $("nav.mobile").slideUp('fast');
19		}
20
21		if(W <= 767)
22		{
23			$('.menubar').removeClass('stuck');
24			$('body').css('padding-top', '0');
25		}
26	});
27
28
29// tabbing fields
30	$("input").keyup(function () {
31		if (this.value.length == this.maxLength) {
32		  $(this).next('input').focus();
33		}
34	});
35
36// close things
37	$( 'html' ).click(function() {
38		close_dd();
39		close_hb();
40		close_search();
41	});
42
43// toggle aria-expanded
44	function toggle_expanded(obj) {
45		var exp = $(obj).attr("aria-expanded");
46		if(exp === 'false')
47			$(obj).attr("aria-expanded", 'true');
48		else
49			$(obj).attr("aria-expanded", 'false');
50	}
51
52// smarter banner
53	$("#exappbanner").click(function(){
54		$(".smarterbanner").slideUp("fast");
55	});
56
57
58// search 
59	$('#sitesearch').click(function(s){
60		s.stopPropagation(s);
61		$(".sitesearch").animate({width: 'toggle'}, 'slow');
62//		$(".sitesearch").slideToggle("slow");
63		$(this).toggleClass("down");
64		$(".searchbox").focus();
65		toggle_expanded(this);
66		close_hb();
67		close_dd();
68		close_mobi_menu();
69	});
70
71	$('#searchex').click(function(s){
72		$(".sitesearch").animate({width: 'toggle'}, 'slow');
73		toggle_expanded(this);
74	});
75
76
77	function close_search(){
78        $(".sitesearch").slideUp("fast");
79		$('#sitesearch').attr("aria-expanded", 'false');
80		$('#sitesearch').removeClass("down");
81		$(".searchbox").blur();
82	}
83
84	$( '.sitesearch' ).click(function(s) {
85		s.stopPropagation();
86	});
87
88// hb
89	$( '#hbbttn, #hbbttn2' ).click(function(v) {
90		v.stopPropagation();
91		if (window.matchMedia('(prefers-reduced-motion: reduce)').matches)
92			$(".hb").toggleClass("hbopen");
93		else	
94			$(".hb").slideToggle("slow");
95		toggle_expanded(this);
96		$(this).toggleClass("down");
97        close_search();
98		close_dd();
99		close_mobi_menu();
100	});
101
102	$( '#hbex' ).click(function(v) {
103		close_hb();
104	});
105	
106	function close_hb(){
107		if (window.matchMedia('(prefers-reduced-motion: reduce)').matches)
108			$(".hb").removeClass("hbopen");
109		else	
110			$(".hb").slideUp("fast");
111		$('#hbbttn').attr("aria-expanded", 'false');
112		$('#hbbttn').removeClass("down");
113	}
114
115	$( '.hb' ).click(function(e) {
116		e.stopPropagation();
117	});
118
119// blog panel date
120/*	function GetMonthName(monthNumber) {
121		  var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
122		  return months[monthNumber - 1];
123	}
124
125	$('.blog-grid-wrap .blog_posted_date').each( function( i ) {
126		var unformatted = $(this).text();
127		var from = unformatted.split("/");
128		var formatted = GetMonthName(from[0]) +' '+ from[1] +', '+from[2];
129		$(this).text(formatted);
130	});
131*/
132
133// blog to remove >> form button
134//	$('a.blog_read_more').html("Read More");
135
136
137// menu
138	function get_left(obj) {
139		var W = $( window ).width();
140		var childPos = $(obj).offset();
141		var parentPos = $(obj).parent().offset();
142		var childLeft = childPos.left - parentPos.left;
143		return childLeft;
144	}
145
146	function get_R(obj) {
147		var W = $( window ).width();
148		var bttnW = $( obj ).width();
149		var childPos = $(obj).offset();
150		var parentPos = $(obj).parent().offset();
151		var childR = childPos.left - parentPos.left - (460 - bttnW);
152		return childR;
153	}
154
155	$( '.CMitem' ).click(function(event) {
156		var which = $(this).attr("rel");
157		close_hb();
158		close_search();
159		Mpos = get_left(this);
160		event.stopPropagation();
161		if($( this ).hasClass( "opened" ) )
162		{
163			$(this).removeClass( "opened" );
164			$(this).attr("aria-expanded", 'false');
165			if (window.matchMedia('(prefers-reduced-motion: reduce)').matches)
166				$("#CMc"+which).css("display", "none");
167			else
168				$("#CMc"+which).slideUp("fast");
169
170		}
171		else
172		{
173			close_dd();
174			$("#CMc"+which).css("left", Mpos+'px');
175			$( this ).toggleClass( "opened" );
176			$(this).attr("aria-expanded", 'true');
177
178			if (window.matchMedia('(prefers-reduced-motion: reduce)').matches)
179				$("#CMc"+which).css("display", "block");
180			else
181				$("#CMc"+which).slideDown("slow");
182
183		}
184	});
185
186	function close_dd(){
187		if (window.matchMedia('(prefers-reduced-motion: reduce)').matches)
188			$(".ddcontent").css("display", "none");
189		else
190			$(".ddcontent").slideUp("fast");
191		$('.opened').removeClass( "opened" );
192		$('.CMitem' ).attr("aria-expanded", 'false');
193		$('button.CMlink').attr("aria-expanded", 'false');
194	}
195
196	$( '.ddcontent' ).click(function(event) {
197		event.stopPropagation();
198	});
199
200/* for 3rd level */
201	$( 'button.CMlink' ).click(function(event) {
202		event.stopPropagation();
203		toggle_expanded(this);
204		var which = $(this).attr("which");
205		$("#CMs"+which).slideToggle('slow');
206		$("button#CMb"+which).toggleClass( "opened" );
207	});
208
209
210// mobi menu
211
212	$( '.menutoggler' ).click(function(m) {
213		m.stopPropagation();
214        $("nav.mobile").slideToggle('slow');
215		$(this).toggleClass('menuex');
216		toggle_expanded(this);
217		close_hb();
218		close_search();
219	});
220
221	function close_mobi_menu(){
222		var W = $( window ).width();
223		if(W < 1200) {
224			$("nav.mobile").slideUp('slow');
225			$('.menutoggler').attr("aria-expanded", 'false');
226		}
227	}
228
229	$( 'nav.mobile button' ).click(function() {
230		var which = $(this).attr("which");
231		$("#MM"+which).slideToggle("slow");
232		$(this).toggleClass("flipped");
233		toggle_expanded(this);
234	});
235
236
237// stickiness
238
239	function get_orient()
240	{
241			var O = 'L';
242			if(window.innerHeight > window.innerWidth)
243				O = 'P';
244			return O;
245	}
246
247	$(window).scroll(function(){
248		var Htop = 0;
249		if($('.alertholder').length > 0)
250			Htop += $('.alertholder').height();
251		if($('.smarterbanner').length > 0)
252			Htop += $('.smarterbanner').height();
253		var headH = $('header').height();
254		var wintop = $(window).scrollTop();
255		var W = $( window ).width();
256		
257		if(W > 767)
258		{
259			if(wintop > Htop)
260			{
261				$('header').addClass('stuck');
262				$('.homelink_shadow').addClass('stuck');
263				$('body').css('padding-top', headH+'px');
264				$("nav.mobile").addClass('fxd');
265			}
266			else
267			{
268				$('header').removeClass('stuck');
269				$('.homelink_shadow').removeClass('stuck');
270				$('body').css('padding-top', '0');
271				$("nav.mobile").removeClass('fxd');
272			}
273		}
274
275	});
276
277
278
279// this is the end, my only friend, the end
280});
281
282

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.