PageSourceSearch

https://www.hologic.es/themes/custom/hologic/global/js/component-timeline.js?tm4wcr

js hologic.es collected 2026-10-08 20:32:46 UTC 1,532 bytes, 51 lines download raw bytes

1/**
2 * @file
3 */
4
5 (function($, Drupal, drupalSettings, once) {
6
7  'use strict';
8
9  /**
10   * Timeline component.
11   */
12  Drupal.behaviors.componentTimeline = {
13    attach: function (context, settings) {
14
15      $(once('component-timeline', '.component-timeline', context)).each(function() {
16        const $timelineComponent = $(this);
17        const $timelineNavigation = $('.timeline-navigation', $timelineComponent);
18        const $navButton = $('.timeline-navigation-year', $timelineComponent);
19        const $slider = $('.coh-slider-container', $timelineComponent);
20        const $header = $('#navbar');
21
22        $navButton.first().addClass('active');
23        $navButton.on('click', function() {
24          $navButton.removeClass('active');
25          $(this).addClass('active');
26        });
27
28        $slider.on('afterChange', function(event, slick, currentSlide) {
29          if (currentSlide + slick.options.slidesToScroll >= slick.slideCount) {
30            slick.$nextArrow.hide();
31          } else {
32            slick.$nextArrow.show();
33          }
34        });
35
36        $(window).on('load scroll', function() {
37          const headerHeight = $header.length ? $header.outerHeight() : 0;
38          const scrollPos = $timelineComponent.offset().top - headerHeight;
39
40          if ($(window).scrollTop() > scrollPos) {
41            $timelineNavigation.addClass('sticky');
42          } else {
43            $timelineNavigation.removeClass('sticky');
44          }
45        });
46      });
47
48    }
49  };
50
51})(jQuery, Drupal, drupalSettings, once);

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.