PageSourceSearch

https://www.teamgate.com/wp-content/themes/teamgate/assets/js/pricing.js?ver=2.2.43

js teamgate.com collected 2026-10-02 02:34:19 UTC 10,062 bytes, 236 lines download raw bytes

1var $ = jQuery.noConflict();
2$(function() {
3	// Start of Pricing 2023
4	var prices = {
5		monthly: {
6			eur: {
7				starter: 'FREE',
8				team: '49.90',
9				growth: '74.90'
10			},
11			usd: {
12				starter: 'FREE',
13				team: '49.90',
14				growth: '74.90'
15			}
16		},
17		annual: {
18			eur: {
19				starter: 'FREE',
20				team: '39.90',
21				growth: '59.90'
22			},
23			usd: {
24				starter: 'FREE',
25				team: '39.90',
26				growth: '59.90'
27			}
28		}
29	};
30
31	var currency = 'usd';
32	
33	$('.pricing-2026-toggle').each(function() {
34		var toggle = $(this);
35		var priceEl = toggle.nextAll('.pricing-2023-plans-price').first();
36		var plan = priceEl.find('[data-plan]').data('plan');
37		priceEl.find('[data-plan]').text(prices['annual'][currency][plan]);
38	});
39
40	$('.pricing-2023-switch__container-btn-monthly').on('click', function() {
41		var toggle = $(this).closest('.pricing-2026-toggle');
42		var priceEl = toggle.nextAll('.pricing-2023-plans-price').first();
43		var plan = priceEl.find('[data-plan]').data('plan');
44
45		priceEl.find('[data-plan]').text(prices['monthly'][currency][plan]);
46
47		$(this).addClass('pricing-2023-switch__container-btn-active');
48		$(this).siblings('.pricing-2023-switch__container-btn-annual').removeClass('pricing-2023-switch__container-btn-active');
49	});
50
51	$('.pricing-2023-switch__container-btn-annual').on('click', function() {
52		var toggle = $(this).closest('.pricing-2026-toggle');
53		var priceEl = toggle.nextAll('.pricing-2023-plans-price').first();
54		var plan = priceEl.find('[data-plan]').data('plan');
55
56		priceEl.find('[data-plan]').text(prices['annual'][currency][plan]);
57
58		$(this).addClass('pricing-2023-switch__container-btn-active');
59		$(this).siblings('.pricing-2023-switch__container-btn-monthly').removeClass('pricing-2023-switch__container-btn-active');
60	});
61
62	$('.pricing-2023-switch__container-btn-eur').on('click', function() {
63		currency = 'eur';
64		$(this).addClass('pricing-2023-switch__container-btn-active');
65		$('.pricing-2023-switch__container-btn-usd').removeClass('pricing-2023-switch__container-btn-active');
66		$('.pricing-2023-plans-users-currency').text('EUR PER USER PER MONTH');
67		$('.pricing-2023-plans-price .currency').text('€');
68
69		$('.pricing-2026-toggle').each(function() {
70			var toggle = $(this);
71			var priceEl = toggle.nextAll('.pricing-2023-plans-price').first();
72			var plan = priceEl.find('[data-plan]').data('plan');
73			var frequency = toggle.find('.pricing-2023-switch__container-btn-annual').hasClass('pricing-2023-switch__container-btn-active') ? 'annual' : 'monthly';
74			priceEl.find('[data-plan]').text(prices[frequency][currency][plan]);
75		});
76	});
77
78	const compareLinks = document.querySelectorAll('.pricing-2023-plans-compare');
79	const scrollOffset = 150;
80	compareLinks.forEach(function(link) {
81        link.addEventListener('click', function(e) {
82            e.preventDefault();
83            const comparisonTable = document.getElementById(this.getAttribute('data-target'));
84            if (comparisonTable) {
85                const offset = comparisonTable.getBoundingClientRect().top + window.scrollY - scrollOffset;
86                window.scrollTo({
87                    top: offset,
88                    behavior: 'smooth'
89                });
90            }
91        });
92    });
93
94//  End of Pricing 2023
95
96	$( 'body' ).on( 'click', '[data-button="accept"]', function() {
97		jQuery.cookie('TG-COOKIE-CONSENT', '1', { expires: 365, path: '/' });
98		jQuery('.cookie-holder').addClass('animated bounceOutLeft');
99	});
100
101	// Christmas
102	if(jQuery('.pricing-page').hasClass('holiday') === true){
103		jQuery('.banner-block.three-easy .banner-title').text('Save up to 50% on annual Growth plan only during holiday season');
104		jQuery('.banner-block.three-easy .banner-title').append('<div class="secondaryInfo"><p class="secondDesc">Discounts apply for the first year and new users only</p></div>');
105	}
106	
107	// starter-free-2-months
108	if(jQuery('.pricing-page').hasClass('starter-free-2-months') === true){
109		jQuery('.plan-item.starter .wrapper').append('<p class="conditional-block">*Conditions apply</p>');
110		jQuery('.plan-item.starter .wrapper').append('<div class="try-free-badge-block"><div class="badge-info-block"><p class="title">Get 2 months<br/>free!*</p><a class="btn" href="mailto:[email protected]">Contact us</a></div></div>');
111	}
112
113	// discount-annual-plan
114	if(jQuery('.pricing-page').hasClass('discount-annual-plan') === true){
115		jQuery('.plan-item.growth .wrapper').append('<div class="landing-badge-block"><a href="mailto:[email protected]?subject=Discount on Growth pricing plan&body=I would like to know more about Growth pricing plan deal!"><div class="badge-info-block"><p class="title">Annual pricing plan <span class="percent">50%</span> off</p></div></a></div>');
116	}
117
118	$(".dropdown-menu li span").click(function(event){
119		event.stopPropagation();
120		$(".dropdown-menu li").removeClass('active');
121		$(this).closest('li').addClass('active');
122		$(this).parents(".dropdown").find('.btn').html($(this).text());
123		$(this).parents(".dropdown").find('.btn').val($(this).data('value'));
124		if($(this).data('value') === 'monthly'){
125			$('#switch-lg').prop('checked', false);
126			periodChange('#switch-lg');
127		}else{
128			$('#switch-lg').prop('checked', true);
129			periodChange('#switch-lg');
130		}
131		$('.dropdown-menu').toggle();
132	  });
133
134	function periodChange($selector){
135		if($($selector).prop('checked') === true){			
136			$('.switch .period').removeClass('active');
137			$('.switch .period.annually').addClass('active');
138			$('.badge-block').html('');
139			$('.badge-block').append( '<img src="/wp-content/themes/teamgate/assets/images/discount_badge_c.svg" alt="Teamgate discount badge" height="60" width="60"/>' );
140			$('.plans-block .info-block').text('Per user/month billed annually');
141			if(jQuery('.pricing-page').hasClass('holiday') === true){
142				jQuery('.plans-block .plan-item.growth').addClass('holiday');
143				if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
144					// You are in mobile browser
145				}else{
146					jQuery('.plans-block .plan-item.growth .btn').text('Contact sales');
147					$( 'body' ).on( 'click', '.plans-block .plan-item.growth.holiday .btn', function(e) {
148						e.preventDefault();
149						Intercom('showMessages');
150					});
151				}				
152			}
153			if(currencySymbol === 'usd'){
154				jQuery('[data-plan="starter"]').text('9');
155				jQuery('[data-plan="team"]').text('26');
156				if(jQuery('.pricing-page').hasClass('holiday') === true){
157					jQuery('.plans-block .plan-item.growth .price-block').addClass('holiday');
158					jQuery('[data-plan="growth"]').text('39');
159					jQuery('.plans-block .plan-item.growth .price-block .old-price').remove();
160					jQuery('.plans-block .plan-item.growth .price-block').append('<span class="old-price"><i class="currency" data-currency="symbol">$</i><span class="price">65</span></span>');
161				}else{
162					jQuery('[data-plan="growth"]').text('65');
163				}
164			}else if(currencySymbol === 'eur'){
165				jQuery('[data-plan="starter"]').text('9');
166				jQuery('[data-plan="team"]').text('26');
167				if(jQuery('.pricing-page').hasClass('holiday') === true){
168					jQuery('.plans-block .plan-item.growth .price-block').addClass('holiday');
169					jQuery('[data-plan="growth"]').text('39');
170					jQuery('.plans-block .plan-item.growth .price-block .old-price').remove();
171					jQuery('.plans-block .plan-item.growth .price-block').append('<span class="old-price"><i class="currency" data-currency="symbol">€</i><span class="price">65</span></span>');
172				}else{
173					jQuery('[data-plan="growth"]').text('65');
174				}
175			}else{
176				jQuery('[data-plan="starter"]').text('7');
177				jQuery('[data-plan="team"]').text('21');
178				if(jQuery('.pricing-page').hasClass('holiday') === true){
179					jQuery('.plans-block .plan-item.growth .price-block').addClass('holiday');
180					jQuery('[data-plan="growth"]').text('31');
181					jQuery('.plans-block .plan-item.growth .price-block .old-price').remove();
182					jQuery('.plans-block .plan-item.growth .price-block').append('<span class="old-price"><i class="currency" data-currency="symbol">£</i><span class="price">
18253</span></span>');
183				}else{
184					jQuery('[data-plan="growth"]').text('53');
185				}
186			}
187		}else{
188			$('.switch .period').removeClass('active');
189			$('.switch .period.monthly').addClass('active');
190			$('.badge-block').html('');
191			$('.plans-block .info-block').text('Per user/month billed monthly');
192			if(jQuery('.pricing-page').hasClass('holiday') === true){
193				jQuery('.plans-block .plan-item.growth').removeClass('holiday');
194				jQuery('.plans-block .plan-item.growth .btn').text('Try now FREE');
195			}
196			if(currencySymbol === 'usd'){
197				jQuery('[data-plan="starter"]').text('11');
198				jQuery('[data-plan="team"]').text('32');
199				jQuery('[data-plan="growth"]').text('79');
200				if(jQuery('.pricing-page').hasClass('holiday') === true){
201					jQuery('.plans-block .plan-item.growth .price-block').removeClass('holiday');
202					jQuery('.plans-block .plan-item.growth .price-block .old-price').remove();
203				}
204			}else if(currencySymbol === 'eur'){
205				jQuery('[data-plan="starter"]').text('11');
206				jQuery('[data-plan="team"]').text('32');
207				jQuery('[data-plan="growth"]').text('79');
208				if(jQuery('.pricing-page').hasClass('holiday') === true){
209					jQuery('.plans-block .plan-item.growth .price-block').removeClass('holiday');
210					jQuery('.plans-block .plan-item.growth .price-block .old-price').remove();
211				}
212			}else{
213				jQuery('[data-plan="starter"]').text('9');
214				jQuery('[data-plan="team"]').text('26');
215				jQuery('[data-plan="growth"]').text('65');
216				if(jQuery('.pricing-page').hasClass('holiday') === true){
217					jQuery('.plans-block .plan-item.growth .price-block').removeClass('holiday');
218					jQuery('.plans-block .plan-item.growth .price-block .old-price').remove();
219				}
220			}
221		}
222	}
223
224	function hideCookies() {
225		var tgCookie = jQuery.cookie('TG-COOKIE-CONSENT');
226		if (tgCookie === '1') {
227			jQuery('.cookie-holder').addClass('hidden');
228		} else {
229			jQuery('.cookie-holder').removeClass('hidden');
230		}
231	}
232
233	$( window ).load(function() {
234        hideCookies();
235    });
236});

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.