PageSourceSearch

https://www.basketballjobmarket.com/jm/wp-content/themes/cs-jmarket/js/main.js?ver=1791027036

js basketballjobmarket.com collected 2026-10-04 13:27:12 UTC 6,771 bytes, 237 lines download raw bytes

1$(function() {
2
3	function responsiveMenu(trigger, menu, close = false) {
4
5		if(typeof trigger != 'undefined' || typeof menu != 'undefined'){
6			var $trigger = $(trigger);
7			var $menu    = $(menu);
8			var $close;
9
10			if(close) {
11				$close = $(close);
12				$close.on('click', function(e){
13					e.preventDefault();
14					closeMenu($menu);
15				});
16			}
17
18			var openMenu = function(el){
19				if(typeof el != 'undefined'){
20					el.addClass('open');
21				}
22			};
23
24			var closeMenu = function(el){
25				if(typeof el != 'undefined'){
26					el.removeClass('open');
27				}
28			};
29
30			$trigger.on('click', function(e){
31				e.preventDefault();
32
33				if($(window).width() < 1200){
34
35					if($menu.hasClass('open')) {
36						closeMenu($menu);
37					}
38					else {
39						openMenu($menu);
40					}
41				}
42			});
43
44			$menu.find('.menu-item a').on('click', function(e){
45
46				var $this = $(this);
47				var $parent = $this.parent();
48
49				if($parent.hasClass('menu-item-has-children')) {
50					e.preventDefault();
51				}
52
53				var $sub_menu = $parent.find('ul');
54
55				if($(window).width() < 1200){
56					if($sub_menu.hasClass('open')) {
57						closeMenu($sub_menu);
58						$sub_menu.slideUp();
59					}
60					else {
61						openMenu($sub_menu);
62						$sub_menu.slideDown();
63					}
64				}
65			});
66
67		}
68
69		//run resize event below for this menu
70		var respMenuTimer;
71
72		$(window).on('resize', function(){
73			clearTimeout(respMenuTimer);
74			respMenuTimer = setTimeout(function() {
75				if($(window).width() > 1200){
76					$menu.removeClass('open');
77				}
78			}, 50);
79		});
80	}
81
82
83	// function sliderInit(){
84	// 	$('#partners_slider_inner').carouFredSel({
85	// 		auto: true,
86    // 		width: '100%',
87	// 		prev: '#prev',
88    // 		next: '#next',
89	// 		direction: 'left',
90	// 		items: {
91	// 			visible: 4
92	// 		},
93	// 		scroll: {
94	// 			items: 1,
95	// 			duration: 950,
96	// 			fx: 'scroll',
97	// 			timeoutDuration: 12000
98	// 			}
99	// 		},
100	// 		{
101	// 		wrapper: {classname: 'caroufredsel_wrapper caroufredsel_wrapper_slider'}
102	// 	}).css({'visibility' : 'visible'});
103	//
104	// 	//partners slider animate previous and next buttons on hover
105	// 	$('#partners_slider_inner, #prev, #next').hover(function () {
106	// 		$('#prev, #next').stop().animate({ opacity: 1 });
107 	// 	}, function () {
108	// 		$('#prev, #next').stop().animate({ opacity: 0 });
109 	// 	});
110 	// }
111	//
112	//fixed menu to the top of the page when scrolling
113	function fixedMenu(){
114	    var nav = $('.header');
115    	var navHomeY = nav.offset().top;
116    	var isFixed = false;
117		var $w = $(window);
118
119    	$w.scroll(function() {
120        	var scrollTop = $w.scrollTop();
121        	var shouldBeFixed = scrollTop > navHomeY;
122        	if (shouldBeFixed && !isFixed) {
123         		nav.css({	'position': 'fixed', 'top': 0, 'left': 0});
124            	isFixed = true;
125        	}
126        	else if (!shouldBeFixed && isFixed)
127        	{
128           	 	nav.css({'position': 'relative'});
129				isFixed = false;
130        	}
131    	});
132
133	}
134
135	//highlight current menu item
136	function menuCurrent(){
137		$('.menu_wrapper .menu a').each(function (index) {
138    		if (this.href.trim() == window.location) {
139        		var classSelected = 'current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor';
140        		$(this).addClass(classSelected).closest('.menu-item-has-children').addClass(classSelected);
141    		}
142		});
143	}
144
145	//prevent default click on top menu items
146	function topItemNoClick(){
147		$('.menu_no_link > a').on('click', function(e) {
148			e.preventDefault();
149		});
150	}
151
152	//contact form 7 hide required alert on mouse over
153	$.fn.wpcf7NotValidTip = function(message) {
154		return this.each(function() {
155			var into = $(this);
156				into.append('<span class="wpcf7-not-valid-tip">' + message + '</span>');
157				$('span.wpcf7-not-valid-tip').mouseover(function() {
158					$(this).fadeOut('fast');
159			});
160				into.find(':input').mouseover(function() {
161					into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
162				});
163				into.find(':input').focus(function() {
164					into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
165				});
166		});
167	}
168
169	//add a bottom margin to main container to make footer stick to bottom of the page
170	function fixedFooter(){
171		var stickIt = function() {
172			var footerHeight = $('.footer_wrapper').height();
173			var stickFooterPush = $('.push').height(footerHeight);
174			$('#main_container').css({'marginBottom':'-' + footerHeight + 'px'});
175		},
176		didResize = false;
177		stickIt();
178
179		$(window).resize(function() {
180			didResize = true;
181		});
182
183		setInterval(function() {
184			if(didResize) {
185				didResize = false;
186				stickIt();
187			}
188		});
189	}
190
191	//add responsive menu
192	// function responsiveNav(){
193	// 	$('#menu').slicknav({
194	// 		prependTo: '#main_container',
195	// 		closedSymbol: '<i class="fa fa-chevron-right"></i>',
196	// 		openedSymbol: '<i class="fa fa-chevron-down"></i>'
197	// 	});
198	// }
199
200	function modalPop(){
201		//$('.wp-colorbox-image').colorbox({maxWidth:'99%', maxHeight: '99%'});
202		//$('.wp-colorbox-youtube').colorbox({iframe:true, width:'90%', height:'90%', maxWidth:'99%', maxHeight: '99%'});
203		//$('.wp-colorbox-vimeo').colorbox({iframe:true, width:'90%', height:'90%', maxWidth:'99%', maxHeight: '99%'});
204		//$('.modal_iframe').colorbox({iframe:true, width:'80%', height:'80%', maxWidth:'99%', maxHeight: '99%'});
205		//$('.modal_inline').colorbox({inline:true,  width:'90%', height:'90%',maxWidth:'99%', maxHeight: '99%', scrolling: true });
206
207		// var cboxIframeOptions = {iframe:true,width: '95%',height: '95%',maxWidth: '960px',maxHeight: '960px'}
208		// var cboxInlineOptions = {inline:true,width: '95%',height: '95%',maxWidth: '960px',maxHeight: '960px'}
209
210		// $('.modal_iframe').colorbox(cboxIframeOptions);
211		// $('.modal_inline').colorbox(cboxInlineOptions);
212
213		// $(window).resize(function(){
214		// 	$.colorbox.resize({width: window.innerWidth > parseInt(cboxIframeOptions.maxWidth) ? cboxIframeOptions.maxWidth : cboxIframeOptions.width,height: window.innerHeight > parseInt(cboxIframeOptions.maxHeight) ? cboxIframeOptions.maxHeight : cboxIframeOptions.height});
215		// 	$.colorbox.resize({width: window.innerWidth > parseInt(cboxInlineOptions.maxWidth) ? cboxInlineOptions.maxWidth : cboxInlineOptions.width,height: window.innerHeight > parseInt(cboxInlineOptions.maxHeight) ? cboxInlineOptions.maxHeight : cboxInlineOptions.height});
216		// });
217
218	}
219
220	function findPlayerImage(){
221		var image = $('.meta_image');
222		$('head').append('<meta property="og:image" content="' + image.prop('src') + '" />');
223	}
224
225
226	//init functions
227	//responsiveMenu('.top-menu-responsive', '#top-mobile-overlay');
228    responsiveMenu('.main-menu-responsive','#main-menu-overlay', '.close-main-menu');
229	//fixedMenu();
230	menuCurrent();
231	topItemNoClick();
232	fixedFooter();
233	// responsiveNav();
234	modalPop();
235	findPlayerImage();
236
237});

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.