PageSourceSearch

https://www.champagne-bernard-bijotat.fr/wp-content/plugins/slider-wd/js/wds_hotspot.js?ver=2.2.31

js champagne-bernard-bijotat.fr collected 2026-09-26 20:03:52 UTC 7,222 bytes, 191 lines download raw bytes

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

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.