PageSourceSearch

https://www.cdc.gov/TemplatePackage/5.0/js/modules/sortfilter.js

js cdc.gov collected 2026-09-24 05:16:15 UTC 725 bytes, 29 lines download raw bytes

1/**
2 * @version 4.26.7
3 * Date: 2026-07-30T23:37:20.877Z
4 */
5"use strict";
6
7// TP5 polyfill for sortfilter
8document.addEventListener('sortfilterload', () => CDCSortFilter.init());
9class CDCSortFilter {
10  static init() {
11    return new CDCSortFilter(document.querySelector('sort-filter-root'));
12  }
13  element = '';
14  constructor(element) {
15    this.element = element;
16
17    // set up for dropdowns
18    // original sort filter used Bootstrap 4.
19    this.element.addEventListener('click', e => this.onClick(e));
20  }
21  onClick(e) {
22    let dropdown = e.target.closest('.dropdown');
23    if (!dropdown) {
24      return;
25    }
26    let isOpen = dropdown.classList.contains('show');
27    dropdown.classList.toggle('show', !isOpen);
28  }
29}

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.