PageSourceSearch

https://talltreestalent.com/wp-content/themes/talltreestalent/js/main.js?ver=1790659351

js talltreestalent.com collected 2026-09-29 05:22:56 UTC 14,730 bytes, 566 lines download raw bytes

1	function setEqualHeight() {
2		let maxHeight = 0;
3		const $items = jQuery('.home-testimonial-outer .slick-item .testimonial-content');
4		if (!$items.length) {
5			return;
6		}
7
8		// Release any height set by a previous run BEFORE measuring. outerHeight()
9		// on an element that already has an explicit height returns that height,
10		// so without this reset the first run's number sticks permanently.
11		$items.css({ 'height': 'auto', 'min-height': 0 });
12
13		$items.each(function () {
14			let slideHeight = jQuery(this).outerHeight();
15			if (slideHeight > maxHeight) {
16				maxHeight = slideHeight;
17			}
18		});
19
20		// min-height, not height. This still bottom-aligns the name block across
21		// side-by-side cards, but a quote longer than the measured maximum grows
22		// its own card instead of spilling out of it. That matters because the
23		// measurement can run before slick has applied its responsive slide
24		// widths, so maxHeight is sometimes short — with a fixed height that
25		// clipped the longest testimonial and overlapped it with the name block.
26		$items.css('min-height', maxHeight + 'px');
27	}
28
29	// The correct max depends on viewport width (the cards reflow) and on the
30	// webfonts having loaded, so one run at ready() is never enough.
31	jQuery(window).on('resize orientationchange', function () {
32		clearTimeout(window._ttTestimonialHeightTimer);
33		window._ttTestimonialHeightTimer = setTimeout(setEqualHeight, 150);
34	});
35	if (document.fonts && document.fonts.ready) {
36		document.fonts.ready.then(function () { setEqualHeight(); });
37	}
38
39jQuery(document).ready(function () {
40	
41// 		jQuery(document).ready(function($) {
42// 			$('.gform_wrapper input').on('input', function() {
43// 				const $input = $(this);
44// 				const $parent = $input.closest('.gfield'); // assuming you're using Gravity Forms default markup
45
46// 				if ($input.val().trim() !== '') {
47// 					$parent.addClass('has-content');
48// 				} else {
49// 					$parent.removeClass('has-content');
50// 				}
51// 			});
52// 		});
53	
54	jQuery(document).ready(function($) {
55		$('.gform_wrapper input, .gform_wrapper textarea').on('input', function() {
56			var $input = $(this);
57			var $parent = $input.closest('.gfield'); // Gravity Forms default field wrapper
58
59			if ($input.val().trim() !== '') {
60				$parent.addClass('has-content');
61			} else {
62				$parent.removeClass('has-content');
63			}
64		});
65	});
66	
67	document.addEventListener('gform/postRender', (event) => {
68		console.log("Form Render Triggered");
69		gform.utils.addAsyncFilter('gform/submission/pre_submission', async (data) => {
70			console.log("Button Click Triggered");
71			fbq('track', 'Lead');
72			return data;
73		});
74	});
75	
76	jQuery(".accordion-container .primary-button").click(function(event){
77		event.preventDefault();
78		jQuery(".hidden-testimonials").toggleClass("d-none");
79		jQuery(".hc-say-container .primary-button span").toggleClass("active");
80		jQuery(".faqs-btn").hide();
81	})
82	
83	// Header Scroll With Class Add Code
84    var iScrollPos = 0;
85	
86	jQuery(window).on("scroll", function() {
87
88        var scroll = jQuery(window).scrollTop();
89		var scrollHeader = 50;
90
91		var headerSelector = jQuery(".header");
92        if (scroll > scrollHeader) {
93            headerSelector.addClass("unpinned");
94            headerSelector.removeClass("pinned");
95        }
96        else {
97            headerSelector.removeClass("unpinned");
98            headerSelector.addClass("pinned");
99        }
100		
101		var iCurScrollPos = jQuery(this).scrollTop();
102		var navBarHeight = jQuery(".header").height();
103		if (iCurScrollPos > iScrollPos) {
104			jQuery('.header').removeClass("scrolled");
105		} else if (iCurScrollPos < navBarHeight) {
106			jQuery('.header').removeClass("scrolled");
107		} else {
108			jQuery('.header').addClass("scrolled");
109		}
110		iScrollPos = iCurScrollPos;
111    });
112	
113	
114	
115// 	 var iScrollPos = 0;
116	
117// 	jQuery(window).on("scroll", function() {
118
119//         var scroll = jQuery(window).scrollTop();
120// 		var scrollHeader = 50;
121
122// 		var headerSelector = jQuery(".header");
123//         if (scroll > scrollHeader) {
124//             headerSelector.addClass("unpinned");
125//         }
126//         else {
127//             headerSelector.removeClass("unpinned");
128//         }
129		
130// 		var iCurScrollPos = jQuery(this).scrollTop();
131// 		var navBarHeight = jQuery(".header").height();
132// 		if (iCurScrollPos > iScrollPos) {
133// 			jQuery('.header').removeClass("scrolled");
134// 		} else if (iCurScrollPos < navBarHeight) {
135// 			jQuery('.header').removeClass("scrolled");
136// 		} else {
137// 			jQuery('.header').removeClass("unpinned");
138// 		}
139// 		iScrollPos = iCurScrollPos;
140
141//     });
142	
143	jQuery(".city-list li").hover(
144		function() {
145			var cityName = jQuery(this).attr("data-city");
146			jQuery(".city-list li").removeClass("active");
147			jQuery(".map-marker").removeClass("active");
148			jQuery(this).addClass("active");
149			jQuery(".map-marker[data-city='" + cityName + "']").addClass("active");
150		},
151		function() {
152			// Optional: Remove active class when mouse leaves
153			jQuery(this).removeClass("active");
154			jQuery(".map-marker").removeClass("active");
155		}
156	);
157	
158	
159   
160	
161	
162	jQuery("body").on("click", ".mobile-menu-container .menu-item-has-children > a", function (event) {
163		event.preventDefault();
164		jQuery(this).next().slideToggle();
165	});
166	
167	
168// 	jQuery('.home-pa.owl-carousel').owlCarousel({
169// 		loop:true,
170// 		nav:true,
171// 		dots:false,
172// 		smartSpeed: 1000,
173// 		margin:30,
174// 		animateOut: 'fadeOut',
175// 		autoplay: false,
176// 		navContainer: ".custom-nav-testimonial",
177// 		responsive:{
178// 			0:{
179// 				items:1
180// 			},
181// 			600:{
182// 				items:1
183// 			},
184// 			768:{
185// 				items:1
186// 			},
187// 			992:{
188// 				items:1
189// 			},
190// 			1000:{
191// 				items:1
192// 			}
193// 		}
194// 	});
195	
196	setEqualHeight();
197	
198	jQuery('.home-pa').slick({
199		infinite: true,
200		adaptiveHeight: true,
201		vertical: false,
202 		autoplay: false,
203		autoplaySpeed: 5000,
204		slidesToShow: 1,
205		appendArrows: ".custom-nav-testimonial",
206		slidesToScroll: 1,
207		fade: true, 
208		cssEase: 'linear',
209	});
210	
211	
212	
213    
214	jQuery('.home-testimonial-outer').each(function () {
215		// Below 992px this carousel lays out 2 slides across the track. With only
216		// ONE slide, centerMode shifts the track by half a slot and pushes the card
217		// almost entirely off the right edge of the screen. Turning centerMode off
218		// for a single slide leaves it at the normal first-card position. Slide
219		// width still comes from slidesToShow: 2, so it matches every other page.
220		// Carousels with 2+ slides keep centerMode and behave exactly as before.
221		var slideCount = jQuery(this).children('.slick-item').length;
222		// slick.css centres a track narrower than its list with margin:auto, which
223		// only happens with a single slide. override.css cancels that for this class.
224		if (slideCount === 1) { jQuery(this).addClass('testimonial-single'); }
225		jQuery(this).slick({
226		infinite: true,
227		vertical: true,  // Default: Vertical scrolling
228		autoplay: false,
229		autoplaySpeed: 5000,
230		slidesToShow: 1,
231		appendArrows: ".home-testimonial-dots",
232		slidesToScroll: 1,
233		// At 992px and up this is a VERTICAL carousel, so centerPadding becomes
234		// 100px of top and bottom padding on .slick-list to reveal the slides
235		// above and below. With a single slide there is nothing to reveal, and
236		// that padding just pushes the only card 100px down the page, away from
237		// the section heading it is supposed to sit beside. Same reasoning as the
238		// sub-992 case above. override.css then gives the single card the section
239		// heading's own 50px/130px offset so their top edges line up.
240		centerMode: slideCount > 1,
241		centerPadding: slideCount > 1 ? '100px' : '0',
242		responsive: [
243			{
244				breakpoint: 992,
245				settings: {
246					vertical: false, // Switch to horizontal
247					centerPadding: '0',
248					slidesToShow: 2,
249					centerMode: slideCount > 1,
250				}
251			}
252		]
253		}).on('setPosition', function () {
254			if (window.innerWidth < 992) { // Apply margin only for screen width less than 992px
255				jQuery('.home-testimonial-outer .slick-slide').css({
256					'margin-right': '26px'
257				});
258			} else {
259				jQuery('.home-testimonial-outer .slick-slide').css({
260					'margin-right': '0' // Reset margin when screen is larger
261				});
262			}
263		});
264	});
265
266// 	jQuery('.home-testimonial-outer').slick({
267// 		infinite: true,
268// 		adaptiveHeight: true,
269// 		vertical: true,  // Default: Vertical scrolling
270// 		autoplay: false,
271// 		autoplaySpeed: 5000,
272// 		slidesToShow: 1,
273// 		appendArrows: ".home-testimonial-dots",
274// 		slidesToScroll: 1,
275// 		responsive: [
276// 			{
277// 				breakpoint: 992,
278// 				settings: {
279// 					vertical: false, // Switch to horizontal
280// 				}
281// 			}
282// 		]
283// 	}).on('setPosition', function () {
284// 		jQuery('.home-testimonial-outer .slick-slide').css({
285// 			'margin': '26px 0'
286// 		});
287// 	});
288
289	
290	
291	jQuery(document).on('click', '.board-dropdown .board-dropdown__menu ', function (e) {
292       e.stopPropagation();
293    });
294	
295// 	jQuery(".page-template-template-testimonials .testimonial-text p").append('<span class="testimonial-commas">"</span>');
296	
297	
298
299    
300    
301   
302    
303   
304	jQuery("body").on("click", ".navbar-toggler", function (event) {
305      jQuery(".mobile-menu-container").removeClass("hide");
306    });
307	
308	jQuery("body").on("click", ".mobile-menu-container .close-btn", function (event) {
309		event.preventDefault();
310      jQuery(this).parent().addClass("hide");
311    });
312	
313	jQuery(".form-tabs ul li a").click(function(event){
314        event.preventDefault();
315        var formTabId = jQuery(this).attr("id");
316        jQuery(".form-tabs ul li a").removeClass("active");
317        jQuery(this).addClass("active");
318        jQuery(".form-container").removeClass("show-form");
319        jQuery("." + formTabId).addClass("show-form");
320	});
321
322    jQuery("body").on("click", ".tab-item .tab-title h3", function (event) {
323      event.preventDefault();
324      var that = jQuery(this);
325      jQuery(that).parent().parent().toggleClass("active");
326    });
327
328
329    jQuery('input[type="file"]').change(function(e){
330        var fileName = e.target.files[0].name;
331        jQuery(".filename-selected").show(0, function(){
332          jQuery(this).css({display: "flex"});
333        });
334        jQuery(".filename-selected .file-name").html(fileName);
335      });
336  
337    jQuery('.remove-file').click(function(e){
338        e.preventDefault();
339        jQuery(".resume-upload input[type='file']").val("");
340        jQuery(".filename-selected").show(0, function(){
341            jQuery(this).css({display: "none"});
342        });
343        jQuery(".filename-selected .file-name").html("");
344    });
345
346    
347
348    if (jQuery(".gform_confirmation_message").length > 0){
349        jQuery('html, body').animate({
350            scrollTop: jQuery(".resume-upload").offset().top
351        }, 800);    
352    }
353	
354
355	
356	
357	
358	jQuery('.cs-testimonial.owl-carousel').owlCarousel({
359		loop:true,
360		nav:true,
361		dots:false,
362		dotsEach: true,
363		smartSpeed: 1000,
364		margin:30,
365		autoplay: false,
366		responsive:{
367			0:{
368				items:1
369			},
370			600:{
371				items:1
372			},
373			768:{
374				items:1
375			},
376			992:{
377				items:2
378			},
379			1000:{
380				items:2
381			}
382		}
383	});
384	
385	jQuery('.success-carousel-wrapper .inf-carousel').infiniteslide({
386		pauseonhover: true,
387		responsive: true,
388		speed: 50
389	});
390	
391	jQuery('.success-carousel-wrapper .inf-carousel-reverse').infiniteslide({
392		pauseonhover: true,
393		responsive: true,
394		direction: 'right',
395		speed: 50
396	});
397	
398	
399	
400	
401	
402// 	jQuery('.cs-list.owl-carousel').owlCarousel({
403// 		loop:true,
404// 		nav:false,
405// 		dots:false,
406// 		smartSpeed: 1000,
407// 		margin:20,
408// 		navContainer: ".custom-nav-team",
409// 		autoplay: false,
410// 		responsive:{
411// 			0:{
412// 				onChanged: changetab,
413// 				items:1
414// 			},
415// 			600:{
416// 				items:1,
417// 				onChanged: changetab
418// 			},
419// 			768:{
420// 				items:3
421// 			},
422// 			992:{
423// 				items:4
424// 			},
425// 			1000:{
426// 				items:6
427// 			}
428// 		}
429// 	});
430	
431	jQuery('.cs-list').slick({
432		dots: false,
433		infinite: true,
434		slidesToScroll: 1,
435		appendArrows: ".custom-nav-team",
436		responsive: [
437			{
438			  breakpoint: 5000,
439			  settings: {
440				slidesToShow: 6,
441			  }
442			},
443			{
444			  breakpoint: 992,
445			  settings: {
446				slidesToShow: 4,
447			  }
448			},
449			{
450			  breakpoint: 768,
451			  settings: {
452				slidesToShow: 3,
453			  }
454			},
455			{
456			  breakpoint: 600,
457			  settings: {
458				slidesToShow: 1,
459			  }
460			},
461			{
462			  breakpoint: 480,
463			  settings: {
464				slidesToShow: 1,
465			  }
466			}
467		]
468	});
469	
470	jQuery('.cs-list').on('afterChange', function(event, slick, currentSlide){
471		console.log(slick);
472		var tabID = jQuery(".slick-slide.slick-current .item").attr("data-id");
473		jQuery(".tab-item-content").addClass("d-none");
474		jQuery("#content-" + tabID).removeClass("d-none");
475	});
476	
477	function changetab(event) {
478		var item = event.item.index;
479		if (item){
480			item = item + 1;
481			var tabID = jQuery(".owl-carousel .owl-item:nth-of-type(" + item + ") .item").attr("id");
482			jQuery(".tab-item-content").addClass("d-none");
483			jQuery("#content-" + tabID).removeClass("d-none");
484		}
485	}
486	
487    jQuery('.section-testimonials .owl-carousel').owlCarousel({
488      loop:true,
489      nav:true,
490      dots:true,
491	  smartSpeed: 1000,
492      autoplay: false,
493      responsive:{
494          0:{
495              items:1
496          },
497          600:{
498              items:1
499          },
500          1000:{
501              items:2
502          }
503      }
504  });
505	
506	jQuery('.section-testimonials.inner-section-testimonials .owl-carousel').owlCarousel({
507		loop:true,
508		margin: 40,
509		nav:true,
510		dots:true,
511		smartSpeed: 1000,
512		autoplay: false,
513		responsive:{
514			0:{
515				items:1
516			},
517			600:{
518				items:1
519			},
520			1000:{
521				items:1
522			}
523		}
524	});
525	
526	 jQuery('.primary-menu > li > a').click(function (event) {
527        var siblingLength = jQuery(this).next().length;
528        if (siblingLength > 0){
529            if (!jQuery(this).parent().hasClass("active")){
530                jQuery(".active .dropdown-mega-menu").hide();
531                jQuery(".primary-menu li").removeClass("active");
532            }
533            event.preventDefault();
534            jQuery(this).parent().addClass("active");
535            jQuery(this).next().slideToggle();    
536        }
537    });
538	
539	
540	
541	
542	if(window.innerWidth < 992) {
543		jQuery(".primary-menu li.menu-item-has-children > a").click(function() {
544			jQuery(this).parent().toggleClass("active");
545			return false;
546		});
547    }
548	
549	
550	jQuery(".dropdown-handle").click(function(){
551		jQuery(this).next().toggleClass("showToggle");
552	});
553	
554	
555	
556	jQuery(".see-all").click(function(){
557		jQuery(".links li").toggleClass("show");
558        jQuery(this).hide();
559		return false;
560	});
561	
562	var lastChildClass = jQuery(".main-content-container section:last-child");
563	if (jQuery(lastChildClass).hasClass("partner-with-container") || jQuery(lastChildClass).hasClass("section-jobs:not(.job-board)") ) {
564		jQuery("body").addClass("pre-footer-exists");
565    }
566});

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.