PageSourceSearch

https://metgas.co.uk/wp-content/themes/thegem/js/testimonials-carousel.js?ver=7.1.2

js metgas.co.uk collected 2026-10-06 20:31:20 UTC 2,878 bytes, 90 lines download raw bytes

1(function($) {
2	$(function() {
3
4		$('.gem-testimonials').each(function() {
5
6			var $testimonialsElement = $(this);
7
8			var $testimonials = $('.gem-testimonial-item', $testimonialsElement);
9
10			var $testimonialsWrap = $('<div class="gem-testimonials-carousel-wrap"/>')
11				.appendTo($testimonialsElement);
12			var $testimonialsCarousel = $('<div class="gem-testimonials-carousel"/>')
13				.appendTo($testimonialsWrap);
14			if($testimonialsElement.hasClass('fullwidth-block')) {
15				$testimonialsCarousel.wrap('<div class="container" />');
16			}
17			var $testimonialsNavigation = $('<div class="gem-testimonials-navigation"/>')
18				.appendTo($testimonialsWrap);
19			var $testimonialsPrev = $('<a href="javascript:void(0);" class="gem-prev gem-testimonials-prev"/></a>')
20				.appendTo($testimonialsNavigation);
21			var $testimonialsNext = $('<a href="javascript:void(0);" class="gem-next gem-testimonials-next"/></a>')
22				.appendTo($testimonialsNavigation);
23			$testimonials.appendTo($testimonialsCarousel);
24
25		});
26
27		$('body').updateTestimonialsCarousel();
28		$('.fullwidth-block').each(function() {
29			$(this).on('updateTestimonialsCarousel', function() {
30				$(this).updateTestimonialsCarousel();
31			});
32		});
33		$('.gem_tab').on('tab-update', function() {
34			$(this).updateTestimonialsCarousel();
35		});
36		$('.gem_accordion_content').on('accordion-update', function() {
37			$(this).updateTestimonialsCarousel();
38		});
39
40	});
41
42	$.fn.updateTestimonialsCarousel = function() {
43		$('.gem-testimonials', this).add($(this).filter('.gem-testimonials')).each(function() {
44			var $testimonialsElement = $(this);
45
46			var $testimonialsCarousel = $('.gem-testimonials-carousel', $testimonialsElement);
47			var $testimonials = $('.gem-testimonial-item', $testimonialsCarousel);
48			var $testimonialsPrev = $('.gem-testimonials-prev', $testimonialsElement);
49			var $testimonialsNext = $('.gem-testimonials-next', $testimonialsElement);
50
51			$testimonialsElement.thegemPreloader(function() {
52
53				var $testimonialsView = $testimonialsCarousel.carouFredSel({
54					auto: ($testimonialsElement.data('autoscroll') > 0 ? $testimonialsElement.data('autoscroll') : false),
55					circular: true,
56					infinite: true,
57					width: '100%',
58					height: 'auto',
59					items: 1,
60					align: 'center',
61					responsive: true,
62					swipe: true,
63					prev: $testimonialsPrev,
64					next: $testimonialsNext,
65					scroll: {
66						pauseOnHover: true,
67						fx: 'scroll',
68						easing: 'easeInOutCubic',
69						duration: 1000,
70						onBefore: function(data) {
71							data.items.old.css({
72								opacity: 1
73							}).animate({
74								opacity: 0
75							}, 500, 'linear');
76
77							data.items.visible.css({
78								opacity: 0
79							}).animate({
80								opacity: 1
81							}, 1000, 'linear');
82						}
83					}
84				});
85
86			});
87		});
88	}
89
90})(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.