PageSourceSearch

https://abuserefuge.org/wp-content/themes/thegem/js/clients-grid-carousel.js?ver=5.12.2

js abuserefuge.org collected 2026-10-05 09:55:39 UTC 5,199 bytes, 164 lines download raw bytes

1(function($) {
2
3	$.fn.updateClientsGrid = function() {
4		function initClientsGrid() {
5			if (window.tgpLazyItems !== undefined) {
6				var isShowed = window.tgpLazyItems.checkGroupShowed(this, function(node) {
7					initClientsGrid.call(node);
8				});
9				if (!isShowed) {
10					return;
11				}
12			}
13
14			var $clientsCarouselElement = $(this);
15
16			var $clientsItemsCarousel = $('.gem-clients-grid-carousel', $clientsCarouselElement);
17			var $clientsItemsPagination = $('.gem-mini-pagination', $clientsCarouselElement);
18			var $clientsPrev = $('.gem-client-prev', $clientsCarouselElement);
19			var $clientsNext = $('.gem-client-next', $clientsCarouselElement);
20
21			var autoscroll = $clientsCarouselElement.data('autoscroll') > 0 ? $clientsCarouselElement.data('autoscroll') : false;
22
23			$clientsCarouselElement.thegemPreloader(function() {
24
25				var $clientsGridCarousel = $clientsItemsCarousel.carouFredSel({
26					auto: autoscroll,
27					circular: false,
28					infinite: true,
29					width: '100%',
30					items: 1,
31					responsive: true,
32					height: 'auto',
33					align: 'center',
34					pagination: $clientsItemsPagination,
35					scroll: {
36						pauseOnHover: true
37					},
38					prev: $clientsPrev,
39					next: $clientsNext,
40					swipe: {
41						onTouch: true,
42						onMouse: true
43					}
44				});
45
46			});
47		}
48
49		$('.gem-clients-type-carousel-grid:not(.carousel-disabled)', this).each(initClientsGrid);
50	}
51
52	$.fn.updateClientsCarousel = function() {
53		function initClientsCarousel() {
54			if (window.tgpLazyItems !== undefined) {
55				var isShowed = window.tgpLazyItems.checkGroupShowed(this, function(node) {
56					initClientsCarousel.call(node);
57				});
58				if (!isShowed) {
59					return;
60				}
61			}
62
63			var $clientsElement = $(this);
64
65			var $clientsCarousel = $('.gem-client-carousel', $clientsElement);
66			var $clientsPrev = $('.gem-client-prev', $clientsElement);
67			var $clientsNext = $('.gem-client-next', $clientsElement);
68
69			var autoscroll = $clientsElement.data('autoscroll') > 0 ? $clientsElement.data('autoscroll') : false;
70
71			$clientsElement.thegemPreloader(function() {
72
73				var $clientsView = $clientsCarousel.carouFredSel({
74					auto: autoscroll,
75					circular: true,
76					infinite: false,
77					scroll: {
78						items: 1
79					},
80					width: '100%',
81					responsive: false,
82					height: 'auto',
83					align: 'center',
84					prev: $clientsPrev,
85					next: $clientsNext,
86					swipe: {
87						onTouch: true,
88						onMouse: true
89					}
90				});
91
92			});
93		}
94
95		$('.gem_client_carousel-items:not(.carousel-disabled)', this).each(initClientsCarousel);
96	}
97
98	$(function() {
99
100		$('.gem-clients-type-carousel-grid:not(.carousel-disabled)').each(function() {
101
102			var $clientsCarouselElement = $(this);
103
104			var $clientsItems = $('.gem-clients-slide', $clientsCarouselElement);
105
106			var $clientsItemsWrap = $('<div class="gem-clients-grid-carousel-wrap"/>')
107				.appendTo($clientsCarouselElement);
108			var $clientsItemsCarousel = $('<div class="gem-clients-grid-carousel"/>')
109				.appendTo($clientsItemsWrap);
110			var $clientsItemsPagination = $('<div class="gem-clients-grid-pagination gem-mini-pagination"/>')
111				.appendTo($clientsItemsWrap);
112			if($clientsCarouselElement.hasClass('show-arrows')) {
113				var $clientsArrowsNavigation = $('<div class="gem-client-carousel-navigation"/>')
114					.appendTo($clientsItemsWrap);
115				var $clientsPrev = $('<a href="#" class="gem-prev gem-client-prev" aria-label="arrow-left"></a>')
116					.appendTo($clientsArrowsNavigation);
117				var $clientsNext = $('<a href="#" class="gem-next gem-client-next" aria-label="arrow-right"></a>')
118					.appendTo($clientsArrowsNavigation);
119			}
120			$clientsItems.appendTo($clientsItemsCarousel);
121
122		});
123
124
125		$('.gem_client_carousel-items').each(function () {
126
127			var $clientsElement = $(this);
128
129			var $clients = $('.gem-client-item', $clientsElement);
130
131			var $clientsWrap = $('<div class="gem-client-carousel-item-wrap"/>')
132				.appendTo($clientsElement);
133			var $clientsCarousel = $('<div class="gem-client-carousel"/>')
134				.appendTo($clientsWrap);
135			var $clientsNavigation = $('<div class="gem-client-carousel-navigation"/>')
136				.appendTo($clientsWrap);
137			var $clientsPrev = $('<a href="#" class="gem-prev gem-client-prev" aria-label="arrow-left"></a>')
138				.appendTo($clientsNavigation);
139			var $clientsNext = $('<a href="#" class="gem-next gem-client-next" aria-label="arrow-right"></a>')
140				.appendTo($clientsNavigation);
141			$clients.appendTo($clientsCarousel);
142
143		});
144
145		$('body').updateClientsGrid();
146		$('body').updateClientsCarousel();
147		$('.fullwidth-block').each(function() {
148			$(this).on('updateClientsCarousel', function() {
149				$(this).updateClientsCarousel();
150			});
151		});
152		$('.gem_tab').on('tab-update', function() {
153			$(this).updateClientsGrid();
154		});
155		$(document).on('gem.show.vc.tabs', '[data-vc-accordion]', function() {
156			$(this).data('vc.accordion').getTarget().updateClientsGrid();
157		});
158		$(document).on('gem.show.vc.accordion', '[data-vc-accordion]', function() {
159			$(this).data('vc.accordion').getTarget().updateClientsGrid();
160		});
161
162	});
163
164})(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.