PageSourceSearch

https://www.threeriversagency.net/scripts/hotspotter.js

js threeriversagency.net collected 2026-09-30 09:49:53 UTC 2,131 bytes, 60 lines download raw bytes

1function hotspotter(marker, context, popup) {
2    // Add click event to all map markers
3    $("." + marker).on("mouseover", function (e) {
4        e.preventDefault();
5        e.stopPropagation();
6        var allContext = $("." + context).toArray();
7        var allPopups = $("." + popup).toArray();
8        closeContent(allContext);
9        closeContent(allPopups);
10        // Get the sibling element to the marker clicked and then add open class to open the popup
11        $(this).next().toggleClass("open");
12    });
13
14    $("a.marker").click(function (e) {
15        e.preventDefault();
16        e.stopPropagation();
17        var allContext = $("." + context).toArray();
18        var allPopups = $("." + popup).toArray();
19        closeContent(allContext);
20        closeContent(allPopups);
21        // Get the ID name of the popup to open and then add open class to open the popup
22        var popupID = $(this).attr("class").split(/\s+/)[2];
23        $("#" + popupID + "").addClass("open");
24    });
25
26    // If anywhere in the modal is clicked, close the modal
27    $(".popup-content").click(function () {
28        var allPopups = $("." + popup).toArray();
29        closeContent(allPopups);
30    });
31
32    // If anywhere in the context menu is clicked, close the context menu
33    $("." + context).click(function () {
34        var allContexts = $("." + context).toArray();
35        closeContent(allContexts);
36    });
37
38    // If anywhere on the page is clicked, close the modal
39    $(document).click(function () {
40        var allPopups = $("." + popup).toArray();
41        closeContent(allPopups);
42    });
43
44    // If the esc key is pressed, close the modal
45    $(document).keydown(function (e) {
46        if (e.keyCode == 27) {
47            var allPopups = $("." + popup).toArray();
48            closeContent(allPopups);
49        }
50    });
51
52    // Function that removes "open" class from the input array of elements
53    function closeContent(arr) {
54        for (var el of arr) {
55            if ($(el).hasClass("open")) {
56                $(el).removeClass("open");
57            }
58        }
59    }
60}

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.