PageSourceSearch

https://www.archives.gov/sites/all/themes/nara/scripts/locations.js?tluiwm

js archives.gov collected 2026-09-25 06:09:48 UTC 3,038 bytes, 76 lines download raw bytes

1(function ($) {
2    $().ready(function () {
3        var LocationFilter = LocationFilter || {};
4        LocationFilter.List = function () {
5
6            // Check if filters exist
7            if ($('.locations #filters').length) {                
8                // Run function on link click
9                $('#filters a').click(function (event) {
10                    // Run mapList().
11                    
12                    document.location.href = $(this).attr("href");
13                    event.preventDefault();
14                    console.log('debug-test');
15                    $('#facility-index').children('.active-row').removeClass('active-row');
16                    locationList($(this));
17                });
18
19                $('.locations #facility-index li').each(function(index,element){
20                    console.log('debug-append');
21                    $h3 = $(element).children('h3');
22                    classname = $(element).attr('class');
23                    console.log(classname);
24                    classname.split(' ').forEach(function(cls){
25                        switch(cls){
26                            case 'research':
27                                cls = 'Research';
28                                break;
29                            case 'library':
30                                cls = 'Library';
31                                break;
32                            case 'records':
33                                cls = 'Records';
34                                break;
35                            default:
36                                cls = '';
37                        }
38                        if(cls && cls !='facility-row'){                            
39                            $h3.append("<em class='location-type'>" + cls + "</em>");
40                        }
41                    });
42                })
43
44            }
45            //mapList();
46            function locationList(ctrl) {
47                // Default to the active filters 'a' tag, else adjust the active class for
48                // the new filter.
49                if (typeof ctrl == 'undefined') {
50                    ctrl = $('#filters li.active a');
51                } else {
52                    // Set the styling of the active link button.
53                    $('#filters li').removeClass('active');
54                    $(ctrl).parent().addClass('active');
55                }
56
57                // Remove the currently existing pins.
58                
59
60                // Show/Hide facility info based on selected filter and populate the list
61                //   of facility locations for the map.
62                var filter = $(ctrl).attr('data-filter');
63                var facility_index = [];
64                if (filter == 'all') {
65                    $('.facility').fadeIn("slow");                    
66                } else {
67                    $('.facility').hide();
68                    $('.' + filter).fadeIn("slow");
69                }
70            }
71
72        }
73        LocationFilter.List();
74       
75    });
76}(jQuery));

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.