PageSourceSearch

https://groupemajor.ca/wp-content/plugins/slider-wd/js/wds_hotspot.js?ver=2.2.27

js groupemajor.ca collected 2026-10-02 00:05:42 UTC 7,754 bytes, 206 lines download raw bytes

1function wds_display_hotspot() {
2  jQuery(".wds_layer").each(function() {
3   if (jQuery(this).data("displaytype") == "hover") {
4      jQuery(this).hover(function() {
5        jQuery(this).next().next().hide();
6        jQuery(this).next().next().stop().fadeIn();
7        }, function() {
8          jQuery(this).next().next().stop().fadeOut();
9      });
10    }
11    else {
12      jQuery(this).click(function(e) {
13        e.stopPropagation();             
14        if (jQuery(this).next().next().is(":visible") == true) {
15          jQuery(this).next().next().stop().fadeOut();
16        }
17        else {
18          jQuery(this).next().next().hide();
19          jQuery(this).next().next().stop().fadeIn();
20        }
21      });
22      jQuery("body").click(function() {
23        jQuery('span[data-type="hotspot_text"]').fadeOut();
24      });
25    }
26  });
27}
28
29function wds_hotspot_position(prefix, ratio) {
30  if (typeof prefix == 'undefined' || prefix == "") {
31    var hotspot_layer = ".hotspot_container";
32  }
33  else {
34    hotspot_layer = "#" + prefix + "_div";
35  }
36  if (typeof ratio == 'undefined') {
37    var ratio = 1;
38  }
39  var arrow_size = Math.round(7 * ratio);
40  var distance = Math.round(20 * ratio);
41
42  jQuery(hotspot_layer).each(function() {
43    var layer_id = jQuery(this).attr("id").replace("_div", "");
44    var text_pos = jQuery(this).attr("data-text-position");
45    var slide_width = jQuery(this).parent().outerWidth();
46    var slide_height = jQuery(this).parent().outerHeight();
47    var layer_left = parseFloat(jQuery(this).css("left"));
48    var layer_top = parseFloat(jQuery(this).css("top"));
49    var layer_text_bgcolor = jQuery(this).find("span:nth-child(3)").css("background-color");
50    var chw1, chw2, chw3, chh1, chh2, chh3, marginTop, left, right;
51    var right_border, left_border, top_border, bottom_border, bottom_angle, top_angle;
52    chw1 = parseFloat(jQuery(this).find("span:nth-child(1)").outerWidth());
53    chw2 = parseFloat(jQuery(this).find("span:nth-child(2)").outerWidth());
54    chw3 = parseFloat(jQuery(this).find("span:nth-child(3)").outerWidth());
55
56    chh1 = parseFloat(jQuery(this).find("span:nth-child(1)").outerHeight());
57    chh2 = parseFloat(jQuery(this).find("span:nth-child(2)").outerHeight());
58    chh3 = parseFloat(jQuery(this).find("span:nth-child(3)").outerHeight());
59
60    right_border = layer_left + ((text_pos == "top" || text_pos == "bottom") ? (chw3 / 2 + chw1 / 2) : (chw2 + chw3 + distance));
61    left_border = layer_left - ((text_pos == "top" || text_pos == "bottom") ? (chw3 / 2 - chw1 / 2) : (chw3 + distance));
62
63    top_border = (text_pos == "left" || text_pos == "right") ? layer_top : (layer_top - chh3 - distance);
64    bottom_border = (text_pos == "left" || text_pos == "right") ? (layer_top + chh2) : (layer_top + chh2 + chh3 + distance);
65
66    bottom_angle = layer_top + chh2 / 2 + chh3 / 2;
67    top_angle = layer_top - chh3 / 2 + chh2 / 2;
68
69    if (right_border > slide_width) {
70      text_pos = "left";
71    }
72    else if (left_border < 0) {
73      text_pos = "right";
74    }
75    else if (top_border < 0) {
76      text_pos = "bottom";
77    }
78    else if (bottom_border > slide_height) {
79      text_pos = "top";
80    }
81
82    if (top_angle < 0) {
83      if (text_pos == "right") {
84        text_pos = "top-left";
85      }
86      else if (text_pos == "left") {
87        text_pos = "top-right";
88      }
89    }
90    else if (bottom_angle > slide_height) {
91      if (text_pos == "right") {
92        text_pos = "bottom-left";
93      }
94      else if (text_pos == "left") {
95        text_pos = "bottom-right";
96      }
97    }
98
99    jQuery(this).find("span.hotspot_text_before").removeAttr("style");
100    if (text_pos == "bottom-left") {
101      marginTop = "-" + (chh3 - chw2) + "px";
102      left = (chw2 + distance) + 'px';
103      right = 'auto';
104      jQuery(this).find("span.hotspot_text_before").css({
105        left: "-" + arrow_size + "px",
106        top: (chh3 - (2 * arrow_size + 3)) + "px",
107        borderTop: arrow_size + "px solid transparent",
108        borderBottom: arrow_size + "px solid transparent",
109        borderRight: arrow_size + "px solid " + layer_text_bgcolor
110      });
111    }
112    else if (text_pos == "bottom-right") {
113      marginTop = "-" + (chh3 - chw2) + "px";
114      left = 'auto';
115      right = (chw2 + distance) + 'px';
116      jQuery(this).find("span.hotspot_text_before").css({
117        right: "-" + arrow_size + "px",
118        top: (chh3 - (2 * arrow_size + 3)) + "px",
119        borderTop: arrow_size + "px solid transparent",
120        borderBottom: arrow_size + "px solid transparent",
121        borderLeft: arrow_size + "px solid " + layer_text_bgcolor
122      });
123    }
124    else if (text_pos == "top-left") {
125      marginTop = 0;
126      left = (chw2 + distance) + 'px';
127      right = 'auto';
128      jQuery(this).find("span.hotspot_text_before").css({
129        left: "-" + arrow_size + "px",
130        top: "3px",
131        borderTop: arrow_size + "px solid transparent",
132        borderBottom: arrow_size + "px solid transparent",
133        borderRight: arrow_size + "px solid " + layer_text_bgcolor
134      });
135    }
136    else if (text_pos == "top-right") {
137      marginTop = 0;
138      left = 'auto';
139      right = (chw2 + distance) + 'px';
140      jQuery(this).find("span.hotspot_text_before").css({
141        right: "-" + arrow_size + "px",
142        top: "3px",
143        borderTop: arrow_size + "px solid transparent",
144        borderBottom: arrow_size + "px solid transparent",
145        borderLeft: arrow_size + "px solid " + layer_text_bgcolor
146      });
147    }
148    else if (text_pos == "top") {
149      marginTop = (-1 * (chh3 + distance)) + 'px';
150      left = '-' + ((chw3 - chw2) / 2) + 'px';
151      right = 'auto';
152      jQuery(this).find("span.hotspot_text_before").css({
153        left: (chw3 / 2 - arrow_size) + "px",
154        bottom: "-" + arrow_size + "px",
155        borderLeft: arrow_size + "px solid transparent",
156        borderRight: arrow_size + "px solid transparent",
157        borderTop: arrow_size + "px solid " + layer_text_bgcolor
158      });
159    }
160    else if (text_pos == "bottom") {
161      marginTop = (chw2 + distance) + 'px';
162      left = '-' + ((chw3 - chw2) / 2) + 'px';
163      right = 'auto';
164      jQuery(this).find("span.hotspot_text_before").css({
165        left: (chw3 / 2 - arrow_size) + "px",
166        top: "-" + arrow_size + "px",
167        borderLeft: arrow_size + "px solid transparent",
168        borderRight: arrow_size + "px solid transparent",
169        borderBottom: arrow_size + "px solid " + layer_text_bgcolor
170      });
171    }
172    else if (text_pos == "left") {
173      marginTop = (-1 * ((chh3 - chw2) / 2)) + "px";
174      left = 'auto';
175      right = (chw2 + distance) + 'px';
176      jQuery(this).find("span.hotspot_text_before").css({
177        right: "-" + arrow_size + "px",
178        top: (chh3 / 2 - arrow_size) + "px",
179        borderTop: arrow_size + "px solid transparent",
180        borderBottom: arrow_size + "px solid transparent",
181        borderLeft: arrow_size + "px solid " + layer_text_bgcolor
182      });
183    }
184    else if (text_pos == "right") {
185      marginTop = ((chw2 - chh3) / 2) + "px";
186      left = (chw2 + distance) + 'px';
187      right = 'auto';
188      jQuery(this).find("span.hotspot_text_before").css({
189        left: "-" + arrow_size + "px",
190        top: (chh3 / 2 - arrow_size) + "px",
191        borderTop: arrow_size + "px solid transparent",
192        borderBottom: arrow_size + "px solid transparent",
193        borderRight: arrow_size + "px solid " + layer_text_bgcolor
194      });
195    }
196    jQuery(this).find(".wds_hotspot_text").css({ 
197      marginTop : marginTop,
198      left : left,
199      right : right,
200    });
201
202    /*var random = Math.random() * 10;
203    random = random.toFixed(2) + "s";
204    jQuery(this).find("span:nth-child(2)").css({animationDelay: random, "-webkit-animation-delay": random});*/
205  });
206}

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.