PageSourceSearch

https://yanainc.org/wp-content/themes/sydney/js/elementor.js?ver=20260917

js yanainc.org collected 2026-10-08 22:20:55 UTC 11,822 bytes, 357 lines download raw bytes

1(function ($) {
2
3	var aThemesTeamCarouselrun = function ($scope, $) {
4
5		if ( $().owlCarouselFork ) {
6			$(".roll-team:not(.roll-team.no-carousel)").owlCarouselFork({
7				navigation : false,
8				pagination: true,
9				responsive: true,
10				items: 3,
11				itemsDesktopSmall: [1400,3],
12				itemsTablet:[970,2],
13				itemsTabletSmall: [600,1],
14				itemsMobile: [360,1],
15				touchDrag: true,
16				mouseDrag: true,
17				autoHeight: false,
18				autoPlay: false,
19			}); // end owlCarouselFork
20		} // end if  		
21	};
22
23    var aThemesTestimonialsCarouselrun = function ($scope, $) {
24
25		if ( $().owlCarouselFork ) {
26			$('.roll-testimonials').not('.owl-carousel').owlCarouselFork({
27				navigation : false,
28				pagination: true,
29				responsive: true,
30				items: 1,
31				itemsDesktop: [3000,1],
32				itemsDesktopSmall: [1400,1],
33				itemsTablet:[970,1],
34				itemsTabletSmall: [600,1],
35				itemsMobile: [360,1],
36				touchDrag: true,
37				mouseDrag: true,
38				autoHeight: true,
39				autoPlay: $('.roll-testimonials').data('autoplay')
40			});
41		} 
42
43    };    
44
45    var aThemesNewsCarouselrun = function ($scope, $) {
46
47		if ( $().owlCarouselFork ) {
48			$(".panel-grid-cell .latest-news-wrapper").owlCarouselFork({
49				navigation : false,
50				pagination: true,
51				responsive: true,
52				items: 3,
53				itemsDesktopSmall: [1400,3],
54				itemsTablet:[970,2],
55				itemsTabletSmall: [600,1],
56				itemsMobile: [360,1],
57				touchDrag: true,
58				mouseDrag: true,
59				autoHeight: false,
60				autoPlay: false
61			}); // end owlCarouselFork
62
63		} // end if
64
65	}; 
66
67	var  aThemesteamStyle2 = function ($scope, $) {
68		$( '.roll-team.type-b.style2').find( '.team-item' ).each( function() {
69			var socials = $(this).find( '.team-social' );
70			socials.appendTo( $(this).find( '.team-inner') );
71		});
72	}		
73	
74	var aThemesgroupProductYITHActions = function() {
75
76		var product = $( '.woocommerce ul.products li.product' );
77		product.each(function (index, el) {
78			var placeholder = $( el ).find( '.yith-placeholder' );
79
80			var wcqv 		= $( el ).find( '.yith-wcqv-button' );
81			var wcwl 	= $( el ).find( '.yith-wcwl-add-to-wishlist' );
82			var compare		= $( el ).find( '.compare.button' );
83
84			placeholder.append( wcqv, wcwl, compare);
85
86		});
87	}	
88	
89	var aThemesAnimatedHeading = function($scope, $) {
90		var $strings 	= $scope.find( ".sydney-typed-strings" ).data( 'strings' ).split('|');
91		var $id 		= $scope.find( ".sydney-typed-strings" ).data( 'id' );
92		var $typeSpeed 	= $scope.find( ".sydney-typed-strings" ).data( 'type-speed' );
93		var $backSpeed 	= $scope.find( ".sydney-typed-strings" ).data( 'back-speed' );
94		var $backDelay 	= $scope.find( ".sydney-typed-strings" ).data( 'back-delay' );
95
96		if ( 'undefined' === typeof Typed ) {
97			return;
98		}
99
100		new Typed( "#sydney-animated-heading-" + $id, {
101			strings: $strings,
102			loop: true,
103			typeSpeed: $typeSpeed,
104			backSpeed: $backSpeed,
105			backDelay: $backDelay,
106		});
107	}
108
109	var aThemesHotspotImage = function($scope, $) {
110		var elements 	= $scope.find( ".hotspot-element" );
111
112		$.each(elements, function (i, v) { 
113
114			$( this ).on( "click", function(e) { 
115				e.preventDefault();
116				$( this ).find( '.hotspot-tooltip.on-hover' ).toggleClass( 'hotspot-clicked' );
117			});
118		});
119
120	}
121
122	var aThemesLinkWrapper = function($scope, $) {
123		// The attribute is added to the element's own _wrapper, so it is on $scope
124		// itself, never on a descendant: .find() matched nothing. element_ready/global
125		// fires once per element, so filtering $scope binds each element exactly once.
126		$scope.filter('[data-syd-wrapper-link]').each(function() {
127			var link = $(this).data('syd-wrapper-link');
128			// Namespaced and removed first: the editor re-fires element_ready on every
129			// re-render, and an unnamespaced bind stacks a new handler each time.
130			$(this).off('click.sydWrapperLink').on('click.sydWrapperLink', function() {
131				// The url comes from saved page data, so a javascript: or data:
132				// value would run on click. Denied by scheme rather than by an
133				// allowlist, which would also drop mailto:, tel: and the bare
134				// domains the Elementor url control accepts.
135				var url = String(link.url || '');
136				if (/^\s*(javascript|data|vbscript):/i.test(url)) {
137					return;
138				}
139				if (link.is_external) {
140					window.open(url, '_blank', 'noopener');
141				} else {
142					location.href = url;
143				}
144			})
145		});		
146	}
147
148	var aThemesMailChimp = function ($scope, $) {
149
150		var $mailchimp = $('.sydney-mailchimp-form-wrapper', $scope),
151		$mailchimp_id = $mailchimp.data('mc-id') !== undefined ? $mailchimp.data('mc-id') : '',
152		$button_text = $mailchimp.data('button-text') !== undefined ? $mailchimp.data('button-text') : '',
153		$success_text = $mailchimp.data('success') !== undefined ? $mailchimp.data('success') : '',
154		$loading_text = $mailchimp.data('loading') !== undefined ? $mailchimp.data('loading') : '';
155		$list_id = $mailchimp.data('list-id') !== undefined ? $mailchimp.data('list-id') : '';
156	
157		$('#sydney-mailchimp-form-' + $mailchimp_id, $scope).on('submit', function (e) {
158			e.preventDefault();
159	
160			var _this = $(this);
161	
162			$('.sydney-mc-response', _this).css('display', 'none').html('');
163			$('.sydney-mailchimp-subscribe', _this).addClass('button--loading');
164			$('.sydney-mailchimp-subscribe span', _this).html($loading_text);
165	
166			$.ajax({
167				url: sydney.ajaxurl,
168				type: 'POST',
169				data: {
170				  action: 'mailchimp_subscribe',
171				  fields: _this.serialize(),
172				  listId: $list_id
173				},
174				success: function success(data) {
175				  if (data.status == 'subscribed') {
176					$('input[type=text], input[type=email], textarea', _this).val('');
177					$('.sydney-mc-response', _this).css('display', 'block').html('<p>' + $success_text + '</p>');
178				  } else {
179					$('.sydney-mc-response', _this).css('display', 'block').empty().append($('<p>').text(data.status));
180				  }
181		
182				  $('.sydney-mailchimp-subscribe', _this).removeClass('button--loading');
183				  $('.sydney-mailchimp-subscribe span', _this).html($button_text);
184				}
185			});			
186		});
187	
188	}
189
190	var aThemesAdvancedCarousel = function($scope, $) {
191
192		var $carousel = $scope.find('.athemes-advanced-carousel').eq(0);
193		var $id = $carousel.data('id');
194		var $autoplay = $carousel.data('autoplay');
195		var $autoplay_speed = $carousel.data('autoplay-speed');
196		var $transition_speed = $carousel.data('transition-speed');
197		var $infinite =  $carousel.data('infinite') !== undefined ? $carousel.data('infinite') : false;
198		var $pause_on_hover = $carousel.data('pause-on-hover') !== undefined ? $carousel.data('pause-on-hover') : false;
199
200		$items = $carousel.data('items') !== undefined ? $carousel.data('items') : 3;
201		$items_tablet = $carousel.data('items-tablet') !== undefined ? $carousel.data('items-tablet') : 2;
202		$items_mobile = $carousel.data('items-mobile') !== undefined ? $carousel.data('items-mobile') : 1;
203
204		var swiperConfig = {
205			effect: 'slide',
206			direction: 'horizontal',
207			loop: $infinite,
208			autoplay: {
209				delay: $autoplay_speed,
210				disableOnInteraction: false
211			},
212			autoHeight: true,
213			speed: $transition_speed,    
214			navigation: {
215				nextEl: '.swiper-button-next',
216				prevEl: '.swiper-button-prev',
217			},			    
218			pagination: {
219			el: '.advanced-carousel-pagination',
220			clickable: true,
221			},
222			breakpoints: {
223				1024: {
224					slidesPerView: $items,
225					spaceBetween: 30,
226				},
227				768: {
228					slidesPerView: $items_tablet,
229					spaceBetween: 20,
230				},
231				320: {
232					slidesPerView: $items_mobile,
233					spaceBetween: 20,
234				},
235			}
236		}
237
238		const asyncSwiper = elementorFrontend.utils.swiper;
239	
240		new asyncSwiper( $carousel, swiperConfig ).then( ( newSwiperInstance ) => {		   
241			swiperElement = newSwiperInstance;
242		} );
243
244		if ( $pause_on_hover ) {
245			$carousel.on("mouseenter", function () {
246				swiperElement.autoplay.stop();
247
248			});
249			$carousel.on("mouseleave", function () {
250				swiperElement.autoplay.start();
251			});
252		}
253			
254	}
255
256	var aThemesNewsBar = function($scope, $) {
257
258		//news bar ticker with fade effect powered by swiperjs. posts container is .news-bar-posts
259		var $newsbar = $scope.find('.news-bar-posts').eq(0);
260		var $autoplay_speed = $newsbar.data('autoplay-speed');
261		var $effect = $newsbar.data('effect');
262		var $transition_speed = $newsbar.data('transition-speed');
263		var $pause_on_hover = $newsbar.data('pause-on-hover') !== undefined ? $newsbar.data('pause-on-hover') : false;
264
265		var swiperConfig = {
266			effect: $effect,
267			fadeEffect: {
268				crossFade: true
269			},
270			loop: true,
271			spaceBetween: 30,
272			centeredSlides: true,
273			autoplay: {
274			  delay: $autoplay_speed,
275			  disableOnInteraction: false,
276			},
277			autoHeight: true,
278			speed: $transition_speed, 
279			//navigation
280			navigation: {
281				nextEl: '.bar-button-next',
282				prevEl: '.bar-button-prev',
283			},
284		}
285
286		if ( 'undefined' === typeof Swiper ) {
287			const asyncSwiper = elementorFrontend.utils.swiper;
288		
289			new asyncSwiper( $newsbar, swiperConfig ).then( ( newSwiperInstance ) => {		   
290				swiperElement = newSwiperInstance;
291			} );
292		} else {
293			var swiperElement = new Swiper ( $newsbar, swiperConfig )
294		}
295
296		if ( $pause_on_hover ) {
297			$newsbar.on("mouseenter", function () {
298				swiperElement.autoplay.stop();
299
300			});
301			$newsbar.on("mouseleave", function () {
302				swiperElement.autoplay.start();
303			});
304		}
305
306	}
307
308	var aThemesAdvancedTabs = function ($scope, $) {
309		var $tabs = $scope.find('.athemes-tabs').eq(0);
310
311		// Get all the tab elements
312		const tabTitles = $tabs.find('.athemes-tab-title');
313	
314		// Get all the tab content elements
315		const tabContents = $tabs.find('.athemes-tab-content');
316	
317		// Loop through each tab and add event listener
318		tabTitles.each((index, tabTitle) => {
319			$(tabTitle).on('click', () => {
320				// Remove the 'active-tab' class from all tab titles except the clicked one
321				tabTitles.not(tabTitle).removeClass('active-tab').attr('aria-selected', 'false');
322	
323				// Add the 'active-tab' class to the clicked tab title
324				$(tabTitle).addClass('active-tab').attr('aria-selected', 'true');
325	
326				// Hide all tab contents and remove the 'active-tab' class
327				tabContents.attr('hidden', 'hidden').removeClass('active-tab');
328	
329				// Show the corresponding tab content based on the aria-controls attribute
330				const tabId = $(tabTitle).attr('aria-controls');
331				const tabContent = $tabs.find(`#${tabId}`);
332				if (tabContent.length) {
333					tabContent.removeAttr('hidden').addClass('active-tab');
334				}
335			});
336		});
337	};
338
339
340	$(window).on('elementor/frontend/init', function () {
341        elementorFrontend.hooks.addAction('frontend/element_ready/athemes-testimonials.default', aThemesTestimonialsCarou
341selrun);
342        elementorFrontend.hooks.addAction('frontend/element_ready/athemes-posts.default', aThemesNewsCarouselrun);		
343		elementorFrontend.hooks.addAction('frontend/element_ready/athemes-employee-carousel.default', aThemesTeamCarouselrun);
344		elementorFrontend.hooks.addAction('frontend/element_ready/athemes-employee-carousel.default', aThemesteamStyle2);
345		elementorFrontend.hooks.addAction( 'frontend/element_ready/global', function( $scope ) {
346			aThemesgroupProductYITHActions();
347		} );	
348		elementorFrontend.hooks.addAction("frontend/element_ready/athemes-animated-heading.default", aThemesAnimatedHeading );	
349		elementorFrontend.hooks.addAction("frontend/element_ready/athemes-image-hotspots.default", aThemesHotspotImage );
350		elementorFrontend.hooks.addAction('frontend/element_ready/global', aThemesLinkWrapper );
351		elementorFrontend.hooks.addAction('frontend/element_ready/athemes-mailchimp.default', aThemesMailChimp );
352		elementorFrontend.hooks.addAction('frontend/element_ready/athemes-advanced-carousel.default', aThemesAdvancedCarousel );
353		elementorFrontend.hooks.addAction('frontend/element_ready/athemes-news-bar.default', aThemesNewsBar );
354		elementorFrontend.hooks.addAction('frontend/element_ready/athemes-advanced-tabs.default', aThemesAdvancedTabs );
355	});
356
357})(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.