PageSourceSearch

https://www.ashevilleart.org/wp-content/themes/sf-aam/lib/js//footer-scripts.js?ver=1.0.0

js ashevilleart.org collected 2026-10-02 04:09:16 UTC 2,571 bytes, 106 lines download raw bytes

1jQuery( document ).ready( function($) {
2	// $('.gallery').slick({
3	//   autoplay: false,
4	//   autoplaySpeed: 7000,
5	//   dots: false,
6	//   infinite: true,
7	//   speed: 500,
8	//   slidesToShow: 1,
9	//   slidesToScroll: 1,
10	// });
11
12
13	/**
14	 * Navigation toggling
15	 */
16	(function() {
17
18		$('.nav-div .w-dropdown').on('click', function( e ) {
19
20			e.stopPropagation();
21
22			// Primary menu item being clicked on
23			var container = $(this);
24
25			// The submenu element which opens/closes
26			var nav = container.find('.w-dropdown-list');
27
28			// This element is related to the animation aspect of opening/closing and needs to have the same
29			// classes as the submenu element
30			var toggle = container.find('.w-dropdown-toggle');
31
32			// If clicking inside an open submenu, don't do anything
33			if( nav.has(e.target).length > 0 ) {
34				return;
35			}
36
37			var isActive = nav.hasClass('w--open');
38
39			if( isActive ) {
40				closeMenu();
41				return;
42			}
43
44			openMenu();
45
46			// When activating a submenu, add a one-time listener to the document to trigger a close
47			$(document).one('click', maybeCloseMenuOnDocumentClick );
48
49			function openMenu() {
50				closeSiblings();
51				nav.addClass('w--open');
52				toggle.addClass('w--open');
53			}
54
55			function closeMenu() {
56				nav.removeClass('w--open');
57				toggle.removeClass('w--open');
58			}
59
60			function closeSiblings() {
61				container.siblings().children('.w-dropdown-list').removeClass('w--open');
62				container.siblings().children('.w-dropdown-toggle').removeClass('w--open');
63			}
64
65			function maybeCloseMenuOnDocumentClick( event ) {
66
67				// Close the submenu if the click happened outside the menu
68				if( nav.has( event.target ).length === 0 ) {
69					closeMenu();
70				}
71
72				// Otherwise, if the click happened inside the menu then re-add the one-time listener to try again next time
73				else {
74					$(document).one( 'click', maybeCloseMenuOnDocumentClick );
75				}
76			}
77		});
78	})();
79
80	/**
81	 * Search bar toggling
82	 */
83	(function() {
84
85		var flyout = $('div.flyout-search-bar');
86
87		var openFlyoutElement = $('a.secondary-nav-link-search');
88
89		var closeFlyoutElement = $('a.search-close-button');
90
91		openFlyoutElement.on( 'click', function(){
92
93			flyout.css( {
94				opacity: 1,
95				transform: 'translate3d(0px, 0px, 0px) scale3d(1, 1, 1) rotateX(0deg) rotateY(0deg) rotateZ(0deg) skew(0deg, 0deg)',
96			});
97		});
98
99		closeFlyoutElement.on( 'click', function() {
100			flyout.css( {
101				opacity: 0,
102				transform: 'translate3d(325px, 0px, 0px) scale3d(1, 1, 1) rotateX(0deg) rotateY(0deg) rotateZ(0deg) skew(0deg, 0deg)'
103			});
104		});
105	})();
106});

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.