PageSourceSearch

https://www.localelinkup.com/assets/js/custom.js

js localelinkup.com collected 2026-10-01 14:42:29 UTC 3,830 bytes, 125 lines download raw bytes

1(function($) {
2	"use strict";
3	
4	// When the user scrolls the page, execute myFunction 
5	window.onscroll = function() {myFunction()};
6	function myFunction() {
7		var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
8		var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
9		var scrolled = (winScroll / height) * 100;
10		document.getElementById("myBar").style.width = scrolled + "%";
11	}
12	
13	// ______________Active Class
14	$(document).ready(function() {
15		$(".horizontalMenu-list li a").each(function() {
16			var pageUrl = window.location.href.split(/[?#]/)[0];
17			if (this.href == pageUrl) {
18				$(this).addClass("active");
19				$(this).parent().addClass("active"); // add active to li of the current link
20				$(this).parent().parent().prev().addClass("active"); // add active class to an anchor
21				$(this).parent().parent().prev().click(); // click the item to make it drop
22			}
23		});
24		$(".horizontal-megamenu li a").each(function() {
25			var pageUrl = window.location.href.split(/[?#]/)[0];
26			if (this.href == pageUrl) {
27				$(this).addClass("active");
28				$(this).parent().addClass("active"); // add active to li of the current link
29				$(this).parent().parent().parent().parent().parent().parent().prev().addClass("active"); // add active class to an anchor
30				$(this).parent().parent().prev().click(); // click the item to make it drop
31			}
32		});
33		$(".horizontalMenu-list .sub-menu .sub-menu li a").each(function() {
34			var pageUrl = window.location.href.split(/[?#]/)[0];
35			if (this.href == pageUrl) {
36				$(this).addClass("active");
37				$(this).parent().addClass("active"); // add active to li of the current link
38				$(this).parent().parent().parent().parent().prev().addClass("active"); // add active class to an anchor
39				$(this).parent().parent().prev().click(); // click the item to make it drop
40			}
41		});
42	});
43	
44	// ______________ Back to Top
45	$(window).on("scroll", function(e) {
46		if ($(this).scrollTop() > 0) {
47			$('#back-to-top').fadeIn('slow');
48		} else {
49			$('#back-to-top').fadeOut('slow');
50		}
51	});
52	$("#back-to-top").on("click", function(e) {
53		$("html, body").animate({
54			scrollTop: 0
55		}, 600);
56		return false;
57	});
58	
59	
60	
61	// ______________Quantity-right-plus
62	var quantitiy = 0;
63	$('.quantity-right-plus').on('click', function(e) {
64		e.preventDefault();
65		var quantity = parseInt($('#quantity').val()); 
66		$('#quantity').val(quantity + 1); 
67	});
68	$('.quantity-left-minus').on('click', function(e) {
69		e.preventDefault();
70		var quantity = parseInt($('#quantity').val());
71		if (quantity > 0) {
72			$('#quantity').val(quantity - 1);
73		}
74	});		
75	
76	// ______________Chart-circle
77	if ($('.chart-circle').length) {
78		$('.chart-circle').each(function() {
79			let $this = $(this);
80			$this.circleProgress({
81				fill: {
82					color: $this.attr('data-color')
83				},
84				size: $this.height(),
85				startAngle: -Math.PI / 4 * 2,
86				emptyFill: '#f9faff',
87				lineCap: ''
88			});
89		});
90	}
91	
92	const DIV_CARD = 'div.card';	
93	
94	// ______________Tooltip
95	$('[data-toggle="tooltip"]').tooltip();
96	
97	// ______________Popover
98	$('[data-toggle="popover"]').popover({
99		html: true
100	});
101	
102	// ______________Card Remove
103	$('[data-toggle="card-remove"]').on('click', function(e) {
104		let $card = $(this).closest(DIV_CARD);
105		$card.remove();
106		e.preventDefault();
107		return false;
108	});
109	
110	// ______________Card Collapse
111	$('[data-toggle="card-collapse"]').on('click', function(e) {
112		let $card = $(this).closest(DIV_CARD);
113		$card.toggleClass('card-collapsed');
114		e.preventDefault();
115		return false;
116	});
117	
118	// ______________Card Full Screen
119	$('[data-toggle="card-fullscreen"]').on('click', function(e) {
120		let $card = $(this).closest(DIV_CARD);
121		$card.toggleClass('card-fullscreen').removeClass('card-collapsed');
122		e.preventDefault();
123		return false;
124	});
125})(jQuery);

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.