PageSourceSearch

https://salondesvinsdusoir.be/wp-content/themes/rehub-theme/js/custom_floatpanel.js?ver=1.5

js salondesvinsdusoir.be collected 2026-10-07 03:31:15 UTC 9,278 bytes, 233 lines download raw bytes

1jQuery(document).ready(function($) {
2	'use strict';	
3	
4		var widthwindow = $(window).width();
5		if (widthwindow < 1024 && $('.float-panel-woo-info').length > 0){
6			var floatpanellinks = $('.float-panel-woo-info').clone(true).addClass('wpsm_pretty_colored float-panel-top-links pt10 pl15 pr15 pb10 rh-float-panel');
7			$('body').prepend(floatpanellinks);
8			$('.float-panel-top-links').removeClass('rh-line-left ml15');
9			$('.float-panel-top-links .float-panel-woo-links').removeClass('font80').addClass('font90 smart-scroll-desktop');
10			if($('.re-stickyheader').length > 0){
11				var stickyheight = $('.re-stickyheader').outerHeight();
12				floatpanellinks.css("top", stickyheight);
13			}
14		}
15	
16		var lastId = '';
17		var topMenu = $(".float-panel-woo-links");
18		var topTabs = $(".float-panel-woo-tabs");
19		var topMenuHeight = $("#float-panel-woo-area").outerHeight()+15;
20		var sidecontents = $(".sidecontents");
21		var imagedotcontoller = $("#rh-product-images-dots");
22	
23		if(topMenu.length > 0){
24	
25			// All list items
26			var menuItems = topMenu.find("a");
27			// Anchors corresponding to menu items
28			var scrollItems = menuItems.map(function(){
29				var elem = $(this).attr("href");
30				  var item = $(elem);
31			  if (item.length) { return item; }
32			});
33	
34			// Bind click handler to menu items
35			// so we can get a fancy scroll animation
36			menuItems.click(function(e){
37				var href = $(this).attr("href"),
38				  offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
39				$('html, body').stop().animate({ 
40					  scrollTop: offsetTop
41				}, 500);
42				e.preventDefault();
43			});
44	
45			$('#contents-section-woo-area .contents-woo-area a').click(function(e){
46				var href = $(this).attr("href"),
47				  offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
48				$('html, body').stop().animate({ 
49					  scrollTop: offsetTop
50				}, 500);
51				e.preventDefault();
52			});
53	
54			$(window).on("scroll", $.throttle( 250, function(){
55				// Get container scroll position
56				var fromTop = $(this).scrollTop()+topMenuHeight;
57	
58				// Get id of current scroll item
59				var cur = scrollItems.map(function(){
60					 if ($(this).offset().top < fromTop)
61					   return this;
62				});
63				// Get the id of the current element
64				cur = cur[cur.length-1];
65				var id = cur && cur.length ? cur[0].id : "";
66	
67				if (lastId !== id) {
68					   lastId = id;
69					   // Set/remove current class
70					   var currentmenuItem = menuItems.filter("[href='#"+id+"']");
71					   var currentmenuIteml = currentmenuItem.offset();
72					   menuItems.parent().removeClass("current");
73					   currentmenuItem.parent().addClass("current");
74					   if (typeof currentmenuIteml !== "undefined"){
75						 $('.float-panel-top-links .float-panel-woo-links').stop().animate({scrollLeft: currentmenuIteml.left - 20}, 500);
76					   }
77				}                   
78			}));
79		}
80	
81		if(topTabs.length > 0){
82			var tabItems = topTabs.find("a");
83	
84			tabItems.click(function(e){
85				e.preventDefault();
86				var href = $(this).attr("href"), offsetTop = href === "#" ? 0 : $('.woocommerce-tabs').offset().top-topMenuHeight+1;
87				$('.tabs a[href="'+href+'"]').trigger('click');
88				$('html, body').stop().animate({ 
89					  scrollTop: offsetTop
90				}, 500);
91				return false;
92			});
93	
94		}
95	
96		if(sidecontents.length > 0){ 
97			var sidecontentsItems = sidecontents.find('a');
98			var sidelastId = '';
99	
100			var sidescrollItems = sidecontentsItems.map(function(){
101				var elem = jQuery(this).attr('href');
102				var item = jQuery(elem);
103			  if (item.length) { return item; }
104			});
105			sidecontentsItems.click(function(e){
106				var href = $(this).attr("href"),
107				  offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight-20;
108				$('html, body').stop().animate({ 
109					  scrollTop: offsetTop
110				}, 500);
111				e.preventDefault();
112			});
113			jQuery(window).on("scroll", jQuery.throttle( 350, function(){
114				var sidefromTop = jQuery(this).scrollTop()+55;
115				var sidecur = sidescrollItems.map(function(){
116					if ((jQuery(this).offset().top - 55) < sidefromTop)
117					return this;
118				});
119				sidecur = sidecur[sidecur.length-1];
120				var id = sidecur && sidecur.length ? sidecur[0].id : '';
121	
122				if (sidelastId !== id) {
123					sidelastId = id;
124					var currentmenuItem = sidecontentsItems.filter('[href=\"#'+id+'\"]');
125					sidecontentsItems.addClass('greycolor').removeClass('fontbold').parent().removeClass('current');
126					currentmenuItem.removeClass('greycolor').addClass('fontbold').parent().addClass('current');
127				}                   
128			}));
129		}
130	
131		if(imagedotcontoller.length > 0){ 
132			var heightpost = $('#photo_stack_main_img').offset().top;
133			imagedotcontoller.css('top', heightpost + 20);
134			var imdotItems = imagedotcontoller.find('.rhdot');
135			var imdotlastId = '';
136	
137			var imdotscrollItems = imdotItems.map(function(){
138				var elem = jQuery(this).data('scrollto');
139				var item = jQuery(elem);
140			  if (item.length) { return item; }
141			});
142			imdotItems.on('click', function(e){
143				jQuery(this).addClass('current');
144			});
145			jQuery(window).on("scroll", jQuery.throttle( 350, function(){
146				var imdotfromTop = jQuery(this).scrollTop()+55;
147				var imdotcur = imdotscrollItems.map(function(){
148					if ((jQuery(this).offset().top - 55) < imdotfromTop)
149					return this;
150				});
151				imdotcur = imdotcur[imdotcur.length-1];
152				var id = imdotcur && imdotcur.length ? imdotcur[0].id : '';
153	
154				if (imdotlastId !== id) {
155					imdotlastId = id;
156					var currentimdotItem = imdotItems.filter('[data-scrollto=\"#'+id+'\"]');
157					
158					imdotItems.removeClass('current');
159					currentimdotItem.addClass('current');
160				}                   
161			}));
162		}
163	
164		var lastScrollTop = 0;
165		let rhVideoScrollPanel = function(){
166			if($('.rh-video-scroll-copy').length && !$('.rh-video-scroll-copy').hasClass('active') && $('.rh-video-scroll-cont .rh_lazy_load_video').hasClass('video-container')){
167				let videocopy = $('.rh-video-scroll-copy').offset();
168				let videocopywidth = $('.rh-video-scroll-copy').width();
169				let videoorigheight = $('.rh-video-scroll-cont').outerHeight();
170				$('.rh-video-scroll-wrap').height(videoorigheight);
171				$('.rh-video-scroll-cont').css( "top", videocopy.top - $(document).scrollTop());
172				$('.rh-video-scroll-cont').css( "left", videocopy.left);
173				$('.rh-video-scroll-cont').css( "position", "fixed");
174				$('.rh-video-scroll-cont').css( "z-index", 9999999);
175				$('.rh-video-scroll-cont').css( "width", videocopywidth);
176				$('.rh-video-scroll-cont').css( "height", 200);
177				$('.rh-video-scroll-copy').addClass('active').css("height", 200);
178			}		
179		}
180		$(window).on("scroll", $.throttle( 250,function() {
181			var st = $(this).scrollTop();
182			if($('#contents-section-woo-area').length > 0){
183				var theight = $('#contents-section-woo-area').offset();
184				if (st>theight.top) {
185					$('#float-panel-woo-area, .float-panel-woo-info').addClass('floating');
186					$('.float_p_trigger').addClass('floatactive');
187					if($('.float_trigger_clr_change').length){
188						$('.float_trigger_clr_change').addClass('whitebg rh-shadow3').removeClass('darkbgl woo_white_text_layout whitecolorinner');
189					}
190					imagedotcontoller.addClass('rhhidden');
191					rhVideoScrollPanel();
192	
193				}
194				else {
195					$('#float-panel-woo-area, .float-panel-woo-info').removeClass('floating');
196					$('.float_p_trigger').removeClass('floatactive');
197					if($('.float_trigger_clr_change').length){
198						$('.float_trigger_clr_change').removeClass('whitebg rh-shadow3').addClass('darkbgl woo_white_text_layout whitecolorinner');
199					}
200					if($('.rh-video-scroll-copy').length && $('.rh-video-scroll-copy').hasClass('active') && $('.rh-video-scroll-cont .rh_lazy_load_video').hasClass('video-container')){
201						//$('.rh-video-scroll-wrap').height(videoorigheight);
202						$('.rh-video-scroll-cont').removeAttr('style');
203						$('.rh-video-scroll-copy').removeClass('active').removeAttr('style');
204						$('.rh-video-scroll-wrap').removeAttr('style');
205					}
206					imagedotcontoller.removeClass('rhhidden');				
207				}
208			   if (st > lastScrollTop){
209					   $('#float-panel-woo-area, .float-panel-woo-info').addClass('scrollingDown').removeClass('scrollingUp');
210			   } else {
211					  $('#float-panel-woo-area, .float-panel-woo-info').addClass('scrollingUp').removeClass('scrollingDown');
212			   }
213			   lastScrollTop = st;	
214			}	
215		}));
216	
217		$(window).on("resize", $.throttle( 550,function() {
218			if($('.rh-video-scroll-copy').length && $('.rh-video-scroll-cont .rh_lazy_load_video').hasClass('video-container')){
219				if($('.rh-video-scroll-copy').hasClass('active')){
220					let videocopy = $('.rh-video-scroll-copy').offset();
221					let videocopywidth = $('.rh-video-scroll-copy').width();
222					$('.rh-video-scroll-cont').css( "top", videocopy.top - $(document).scrollTop());
223					$('.rh-video-scroll-cont').css( "left", videocopy.left);
224					$('.rh-video-scroll-cont').css( "width", videocopywidth);								
225				}else{
226					let videoorigheight = $('.rh-video-scroll-cont').outerHeight();
227					$('.rh-video-scroll-wrap').height(videoorigheight);
228				}
229	
230			}
231		}));  
232			   
233	});

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.