PageSourceSearch

https://www.hiltonheadisland.org/themes/custom/hhi/assets/js/slider.js?tlx7u6

js hiltonheadisland.org collected 2026-10-02 05:16:13 UTC 2,413 bytes, 76 lines download raw bytes

1(function ($, Drupal, debounce) {
2  'use strict';
3
4  Drupal.behaviors.slickSlider = {
5    attach: function (context, settings) {
6      $(document).ready(function() {
7        $('.slider').slick();
8      });
9    }
10  };
11
12  // Arrow Positions
13  Drupal.behaviors.arrowPosition = {
14    attach: function (context, settings) {
15      if ($('.carousel .slider').length) {
16        var viewportChange = debounce(function() {
17          $('.carousel .slider').each(function () {
18            var arrowPos = $(this).find('figure').height() / 2;
19            $(this).find('.slick-arrow').css('top', arrowPos);
20          });
21        }, 250);
22        window.addEventListener('resize', viewportChange);
23        window.addEventListener('load', viewportChange);
24      }
25    }
26  };
27
28  // Carousel play/pause proper sync
29  Drupal.behaviors.mulitplePlayPauseFix = {
30    attach: function (context, settings) {
31      $(document).ready(function() {
32        let isSyncing = false;
33        once('sync-carousel-fix', '[class*="sync-carousel"]',context).forEach(function(carousel) {
34          const asNavFor = JSON.parse($(carousel)[0].dataset.slick).asNavFor;
35
36          carousel.querySelector('.slick-autoplay-toggle-button').addEventListener('click', function (e) {
37            if (isSyncing) return;
38            isSyncing = true;
39
40            const otherCarousel = document.querySelector(asNavFor);
41            if (otherCarousel) {
42              const otherBtn = otherCarousel.querySelector('.slick-autoplay-toggle-button');
43              if (otherBtn) {
44                otherBtn.click();
45              }
46            }
47
48            setTimeout(() => {
49              isSyncing = false;
50            }, 0);
51          });
52
53          carousel.querySelector('.slick-autoplay-toggle-button').addEventListener('keydown', function (e) {
54            if (e.key == 'Enter' || e.key == 'Space') {
55              if (isSyncing) return;
56              isSyncing = true;
57
58              const otherCarousel = document.querySelector(asNavFor);
59              if (otherCarousel) {
60                const otherBtn = otherCarousel.querySelector('.slick-autoplay-toggle-button');
61                if (otherBtn) {
62                  otherBtn.click();
63                }
64              }
65
66              setTimeout(() => {
67                isSyncing = false;
68              }, 0);
69            }
70          });
71        })
72      })
73    }
74  };
75
76})(jQuery, Drupal, Drupal.debounce);

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.