PageSourceSearch

https://castings.plc.uk/scripts/owner/bespoke/InteractiveVideoMap.js?d=2

js castings.plc.uk collected 2026-10-07 01:18:01 UTC 3,139 bytes, 77 lines download raw bytes

1_interactiveVideoMap = {
2    initialiseDiagram: function () {
3
4        console.log($(window).innerWidth());
5
6        if ($(window).innerWidth() >= 992) {
7             $(".site-location-pin, .tooltip-element").mouseenter(function () {
8                 // Get the data-id attribute from the hovered element
9                 var id = $(this).data("id");
10
11                 // Find the corresponding .site-location-pin and .tooltip-element and add the 'active' class
12                 var $pin = $('.site-location-mask[data-id="' + id + '"]');
13                 var $tooltip = $('.tooltip-element[data-id="' + id + '"]');
14                 $pin.addClass("active");
15                 $tooltip.addClass("active").show(); // Make sure to show the tooltip as well
16             });
17
18             $(".site-location-pin, .tooltip-element").mouseleave(function () {
19                 // Get the data-id attribute from the hovered element
20                 var id = $(this).data("id");
21
22                 // Find the corresponding .site-location-mask and .tooltip-element and remove the 'active' class
23                 var $pin = $('.site-location-mask[data-id="' + id + '"]');
24                 var $tooltip = $('.tooltip-element[data-id="' + id + '"]');
25                 $pin.removeClass("active");
26                 $tooltip.removeClass("active").hide(); // Hide the tooltip as well
27             });
28
29           
30
31            //  $(".site-location-pin, .tooltip-element").each(function () {
32            //      var $this = $(this);
33            //      var top = $this.data("top");
34            //      var left = $this.data("left");
35
36            //      if (top) {
37            //          $this.css("top", top + "%");
38            //      }
39            //      if (left) {
40            //          $this.css("left", left + "%");
41            //      }
42            //  });
43        }
44
45        else {
46             $(".site-location-pin, .tooltip-element").click(function () {
47                 // Get the data-id attribute from the hovered element
48                 var id = $(this).data("id");
49
50                 $('.site-location-mask:not([data-id="' + id + '"])').removeClass("active");
51                 $('.tooltip-element:not([data-id="' + id + '"])').removeClass("active").hide();
52
53                 // Find the corresponding .site-location-pin and .tooltip-element and add the 'active' class
54                 var $pin = $('.site-location-mask[data-id="' + id + '"]');
55                 var $tooltip = $('.tooltip-element[data-id="' + id + '"]');
56
57                if ($pin.hasClass("active")) {
58                    $pin.removeClass("active");
59                    $tooltip.removeClass("active").hide(); // Hide the tooltip as well
60                } else {
61                    $pin.addClass("active");
62                    $tooltip.addClass("active").show(); // Make sure to show the tooltip as well
63                }
64
65                 
66             });
67
68            
69
70        }
71    },
72};
73
74// Initializers
75$(window).on("load", function () {
76    _interactiveVideoMap.initialiseDiagram();
77});

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.