PageSourceSearch

https://www.cahighschoolfootballhof.com/assets/js/site.js?v=1790313849

js cahighschoolfootballhof.com collected 2026-09-25 05:24:19 UTC 8,838 bytes, 365 lines download raw bytes

1// ANIMATE ON SCROLL //
2
3$(document).ready(function () {
4    AOS.init({
5        offset: 48,
6    });
7	window.addEventListener('load', AOS.refresh);
8});
9
10
11// POPOVERS //
12
13$(function () {
14	$('[data-toggle="popover"]').popover()
15});
16
17
18// TOOLTIPS //
19
20$(function () {
21	$('[data-toggle="tooltip"]').tooltip()
22});
23
24$('#main-nav-menu [data-toggle="collapse"][title]').tooltip();
25
26
27// INPUTS //
28
29$("input.phone").mask("(999) 999-9999");
30
31
32// DROPDOWN MENU ON HOVER //
33
34const $dropdown = $(".dropdown");
35const $dropdownToggle = $(".dropdown-toggle");
36const $dropdownMenu = $(".dropdown-menu");
37const showClass = "show";
38
39$(window).on("load resize", function() {
40  if (this.matchMedia("(min-width: 1200px)").matches) {
41    $dropdown.hover(
42      function() {
43        const $this = $(this);
44        $this.addClass(showClass);
45        $this.find($dropdownToggle).attr("aria-expanded", "true");
46        $this.find($dropdownMenu).addClass(showClass);
47        $this.find($dropdown).addClass(showClass);
48      },
49      function() {
50        const $this = $(this);
51        $this.removeClass(showClass);
52        $this.find($dropdownToggle).attr("aria-expanded", "false");
53        $this.find($dropdownMenu).removeClass(showClass);
54        $this.find($dropdown).removeClass(showClass);
55      }
56    );
57  } else {
58    $dropdown.off("mouseenter mouseleave");
59  }
60});
61
62
63// SMOOTH SCROLLER //
64
65$(document).ready(function() {
66  var divID;
67
68  $('.smooth-scroll').click(function(){
69    divID = $(this).attr("href");
70      if (typeof divID == typeof undefined || divID == false) {
71    divID = $(this).attr("data-target");
72    }
73    $('html, body').animate({
74      scrollTop: $(divID).offset().top - $('#mainNavBar').outerHeight()
75    }, 500);
76  });
77});
78
79if (window.location.hash) {
80
81  divID = window.location.hash;
82
83  $('html, body').animate({
84    scrollTop: $(divID).offset().top - $('#mainNavBar').outerHeight()
85  }, 500);
86
87}
88
89$(document).ready(function() {
90	$('.nav-link.smooth-scroll').click(function() {
91		$('.navbar-collapse.collapse').removeClass('show');
92		$('.navbar-toggler').addClass('collapsed');
93	});
94});
95
96
97// VALIDATOR //
98
99$(document).ready(function() {
100	(function() {
101	  'use strict';
102	  window.addEventListener('load', function() {
103		// Fetch all the forms we want to apply custom Bootstrap validation styles to
104		var forms = document.getElementsByClassName('needs-validation');
105		// Loop over them and prevent submission
106		var validation = Array.prototype.filter.call(forms, function(form) {
107		  form.addEventListener('submit', function(event) {
108			if (form.checkValidity() === false) {
109			  event.preventDefault();
110			  event.stopPropagation();
111			}
112			form.classList.add('was-validated');
113		  }, false);
114		});
115	  }, false);
116	})();
117});
118
119
120// FORM REQUIRED ADD * FEATURE //
121
122$(function() {
123    $("form").each(function() {
124        $(this).find('[required]').each(function() {
125            $(this).addClass('has-required');
126            $(this).parents('.form-group').find('label').append('*');
127        });
128    })
129});
130
131function reset_fields() {
132    $('.has-required:visible').attr('required', true);
133    $('.has-required:not(:visible)').removeAttr('required');
134}
135
136
137// CAROUSEL SWIPE //
138
139!function(t){t.fn.bcSwipe=function(e){var n={threshold:50};return e&&t.extend(n,e),this.each(function(){function e(t){1==t.touches.length&&(u=t.touches[0].pageX,c=!0,this.addEventListener("touchmove",o,!1))}function o(e){if(c){var o=e.touches[0].pageX,i=u-o;Math.abs(i)>=n.threshold&&(h(),t(this).carousel(i>0?"next":"prev"))}}function h(){this.removeEventListener("touchmove",o),u=null,c=!1}var u,c=!1;"ontouchstart"in document.documentElement&&this.addEventListener("touchstart",e,!1)}),this}}(jQuery);
140
141$('.carousel').bcSwipe({ threshold: 50 });
142
143
144// SCROLL TOP //
145
146$(document).on('scroll', function() {
147	if ($(window).scrollTop() > 100) {
148		$('.scroll-top').addClass('show');
149	} else {
150		$('.scroll-top').removeClass('show');
151	}
152});
153
154$(document).ready(function() {
155  $('.scroll-top').click(function(event) {
156    event.preventDefault();
157    $('html, body').animate({scrollTop: 0}, 500);
158    return false;
159  });
160});
161
162
163$(document).ready(function() {
164    $('.start-nomination').click(function() {
165        $('#start-text').addClass('d-none');
166        $('#nomination-form').removeClass('d-none');
167    });
168});
169
170
171// FEATURED LIGHTGALLERY //
172
173// $(document).ready(function() {
174//     $('#gallery').lightGallery({
175//         thumbnail: true,
176//         actualSize: false,
177//         download: false
178//     });
179// });
180
181
182// LIGHT GALLERY //
183
184// $(document).ready(function() {
185//     $('.light-gallery').lightGallery({
186//         actualSize: false,
187//         download: false,
188//         exThumbImage: 'data-exthumbimage',
189//         preload: 0
190//     });
191//     $(".start-lightbox").click(function() {
192//         var gallery_id = $(this).data('id');
193//         $('.lg-button-container').find('#'+gallery_id+' li:first-of-type').trigger('click');
194//         return false;
195//     })
196// });
197
198
199// LIGHTGALLERY //
200
201$(document).ready(function() {
202    $('#photo-gallery').lightSlider({
203        gallery: true,
204        download: false,
205        item: 1,
206        thumbItem: 3,
207        slideMargin: 0,
208        spaceBetween: 15,
209        enableDrag: false,
210        currentPagerPosition: 'left',
211        onSliderLoad: function(el) {
212        el.lightGallery({
213            selector: '#photo-gallery .lslide'
214        });
215        }
216    });
217
218    $('#photo-gallery').lightGallery({
219        download: false,
220        share: false,
221        actualSize: false
222    });
223});
224
225
226// GRID GALLERY //
227
228$(document).ready(function() {
229    $('#grid-gallery').lightGallery({
230        download: false,
231        share: false,
232        actualSize: false
233    });
234});
235
236
237// NEWS //
238$(document).ready(function () {
239	var swiper = new Swiper('.swiper-container.swiper-news', {
240	    slidesPerView: 4,
241	    // slidesPerGroup: 4,
242	    spaceBetween: 15,
243		watchOverflow: true,
244        centerInsufficientSlides: true,
245        // roundLengths: true,
246		// grabCursor: true,
247	    breakpoints: {
248	    576: {
249	        slidesPerView: 1,
250	        // slidesPerGroup: 1,
251	    },
252	    768: {
253	        slidesPerView: 1,
254	        // slidesPerGroup: 1,
255	    },
256	    992: {
257	        slidesPerView: 2,
258	        // slidesPerGroup: 2,
259	    },
260	    1200: {
261	        slidesPerView: 3,
262	        // slidesPerGroup: 3,
263            }
264        },
265	    navigation: {
266	        nextEl: '.swiper-button-next',
267	        prevEl: '.swiper-button-prev',
268	    },
269        pagination: {
270	        el: '.swiper-pagination',
271	        clickable: true,
272			dynamicBullets: true,
273			dynamicMainBullets: 3,
274	    },
275	});
276});
277
278
279// EVENTS //
280
281$(window).on('load', function() {
282	var swiper = new Swiper('.swiper-container.swiper-events', {
283        slidesPerView: 3,
284        // slidesPerGroup: 3,
285	    spaceBetween: 15,
286	    centerInsufficientSlides: true,
287		watchOverflow: true,
288        breakpoints: {
289	    576: {
290	        slidesPerView: 1,
291	        // slidesPerGroup: 1,
292	    },
293	    768: {
294	        slidesPerView: 1,
295	        // slidesPerGroup: 1,
296	    },
297	    992: {
298	        slidesPerView: 2,
299	        // slidesPerGroup: 2,
300	    },
301	    1200: {
302	        slidesPerView: 2,
303	        // slidesPerGroup: 2,
304            }
305	    },
306	    navigation: {
307	        nextEl: '.swiper-button-next',
308	        prevEl: '.swiper-button-prev',
309	    },
310	    pagination: {
311	        el: '.swiper-pagination',
312	        clickable: true,
313			dynamicBullets: true,
314			dynamicMainBullets: 3,
315	    },
316	});
317});
318
319
320// AWARD WINNERS //
321$(document).ready(function () {
322	var swiper = new Swiper('.swiper-container.swiper-award-winners', {
323	    slidesPerView: 5,
324	    // slidesPerGroup: 5,
325	    spaceBetween: 15,
326		watchOverflow: true,
327        centerInsufficientSlides: true,
328        // roundLengths: true,
329		// grabCursor: true,
330	    breakpoints: {
331	    576: {
332	        slidesPerView: 1.5,
333	        // slidesPerGroup: 1.5,
334	    },
335	    768: {
336	        slidesPerView: 2,
337	        // slidesPerGroup: 2,
338	    },
339	    992: {
340	        slidesPerView: 3,
341	        // slidesPerGroup: 3,
342	    },
343	    1200: {
344	        slidesPerView: 4,
345	        // slidesPerGroup: 4,
346            }
347        },
348	    navigation: {
349	        nextEl: '.swiper-button-next',
350	        prevEl: '.swiper-button-prev',
351	    },
352        pagination: {
353	        el: '.swiper-pagination',
354	        clickable: true,
355	        dynamicBullets: true,
356	    },
357	});
358});
359
360
361// DONT TOUCH THIS - LEAVE AT THE END - JESS //
362
363$(window).on('load', function(){
364    $("body").animate({ opacity: 1 });
365});

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.