PageSourceSearch

https://www.grahambarham.com/js/main.js

js grahambarham.com collected 2026-10-01 00:25:16 UTC 1,688 bytes, 75 lines download raw bytes

1jQuery(document).ready(function ($) {
2
3	// Popup: close on X click
4	$('#popupClose').on('click', function () {
5		$('#popup').addClass('hidden');
6	});
7
8	// Popup: close on overlay click (outside the container)
9	$('#popup').on('click', function (e) {
10		if (e.target === this) {
11			$(this).addClass('hidden');
12		}
13	});
14
15	// Music Carousel
16	$('.music-carousel').slick({
17		dots: false,
18		arrows: true,
19		infinite: true,
20		speed: 500,
21		slidesToShow: 1,
22		slidesToScroll: 1,
23		adaptiveHeight: true
24	});
25
26	// Video Carousel
27	$('.video-carousel').slick({
28		dots: false,
29		arrows: true,
30		infinite: true,
31		speed: 500,
32		slidesToShow: 1,
33		slidesToScroll: 1,
34		centerMode: true,
35		centerPadding: '25%',
36		focusOnSelect: true,
37		responsive: [
38			{
39				breakpoint: 991,
40				settings: {
41					centerPadding: '8%'
42				}
43			},
44			{
45				breakpoint: 767,
46				settings: {
47					centerPadding: '5%'
48				}
49			}
50		]
51	});
52
53	// Tour: when the Bandsintown "Show All Dates" button expands the list,
54	// lock the bg photo to the section's pre-expand height so it isn't
55	// stretched. Capture phase so we measure before the widget re-renders.
56	document.addEventListener('click', function (e) {
57		var tour = document.getElementById('tour');
58		if (!tour || !e.target.closest('#tour .bit-upcoming-events-show-all-button')) {
59			return;
60		}
61		tour.style.setProperty('--tour-bg-h', tour.offsetHeight + 'px');
62		tour.classList.add('tour-expanded');
63	}, true);
64
65	// Smooth scroll for anchor links
66	$('a[href^="#"]').on('click', function (e) {
67		var target = $(this.getAttribute('href'));
68		if (target.length) {
69			e.preventDefault();
70			$('html, body').animate({
71				scrollTop: target.offset().top
72			}, 600);
73		}
74	});
75});

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.