PageSourceSearch

https://statesnewsroom.com/wp-content/themes/genesis-child/js/newsroomCards.js?ver=20250424

js statesnewsroom.com collected 2026-10-03 22:10:58 UTC 1,864 bytes, 47 lines download raw bytes

1jQuery(document).ready(function(){
2
3  const paramsString = window.location.search;
4  const searchParams = new URLSearchParams(paramsString);
5
6  const initialRegion = searchParams.get('region');
7  const initialOutlet = searchParams.get('outlet');
8  let currentRegion = '';
9  
10  // Ensure cards start hidden on mobile
11  jQuery('.regionCards').hide();
12
13  // Set up click behavior for region tabs
14  for (const [regionName, regionAbbr] of Object.entries(OUTLET_REGIONS)) {
15    jQuery('#region' + regionAbbr).on('click', function() {
16      currentRegion = regionAbbr;
17      jQuery('.regionTab').removeClass('active');
18      jQuery('#region' + regionAbbr).addClass('active');
19      jQuery('.regionTabs').hide();
20      jQuery('.regionCards').hide(); // Ensures all other cards hidden on mobile
21      jQuery('#' + regionName + 'RegionTabs').css('display','flex');
22      jQuery('#' + regionName + 'RegionCards').css('display','flex');
23      jQuery('.regionSubTab').removeClass('active');
24      jQuery('#' + regionName + 'RegionTabs .regionSubTab:first-child').trigger('click');
25    });
26  }
27
28  // Set up click behavior for outlet tabs
29  jQuery('.regionSubTab').on('click', function() {
30      jQuery('.regionSubTab').removeClass('active');
31      jQuery('.outletCard').hide();
32      jQuery(this).addClass('active');
33      const currentOutlet = jQuery(this).data('state');
34      jQuery('#' + currentOutlet).show();
35      history.replaceState(null, '', '?region=' + currentRegion + '&outlet=' + currentOutlet);
36  })
37
38  // If a particular outlet is requested via the URL, go straight to it;
39  // otherwise, open the very first region/outlet combo
40  if (initialOutlet && initialRegion) {
41    jQuery('#region' + initialRegion).trigger('click');
42    jQuery('#' + initialOutlet + 'button').trigger('click');
43  }
44  else {
45    jQuery('.regionTab:first-child').trigger('click');
46  }
47});

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.