function hero_section() { gsap .timeline({ delay: 1, }) .to(".team_plug_icon", { x: 0, duration: 0.7, ease: "power3.inOut", }) .fromTo( ".team_flash_icon._1", { opacity: 0, x: -10, y: 11, }, { opacity: 1, x: 0, y: 0, } ) .fromTo( ".team_flash_icon._2", { opacity: 0, x: 10, y: 11, }, { opacity: 1, x: 0, y: 0, }, "<" ); } function getRandomValue() { return Math.random() * 2 - 1; } function call_us_section() { $(".team_worm_hole_scene_bw2").each(function (index) { const triggerEle = $(this); let tl = gsap .timeline({ scrollTrigger: { trigger: triggerEle, start: windowViewPort === "desktop" ? "top 65%" : "top 35%", end: "top 5%", scrub: windowViewPort === "desktop" ? 0.25 : false, // markers: true, // once: true, }, }) // .from(".team_worm_hole_illustration.left", { // x: "-18vw", // opacity: 0, // }) // .from( // ".team_worm_hole_illustration.right", // { // x: "18vw", // opacity: 0, // }, // "<" // ) .from( ".team_call_us_label", { opacity: 0, x: getRandomValue() * 50, delay: 0.45, // stagger: { // amount: 0.9, // from: "random", // }, }, "<" ) .to("[heading_order='1']", { opacity: 0, y: -30, // delay: 0.5, }) .to( ".team_callus_line.bot", { opacity: 0, // y: 20 } ) .fromTo( "[heading_order='2']", { opacity: 0, scale: 0.8, // y: 20 }, { opacity: 1, scale: 1, // y: 20 } ) .fromTo( ".team_callus_line.top", { opacity: 0, // y: 20 }, { opacity: 1, // y: 20 }, "<" ); }); } function meet_experts_section() { $(".team_expert_profile_bw2").each(function (index) { const triggerEle = $(this); const profile_title = $(this).find(".team_expert_profile_title"); let tl = gsap .timeline({ scrollTrigger: { trigger: triggerEle, start: "top 50%", end: "bottom bottom", // scrub: 0.25 , // markers: true, // once: true, }, }) .from(profile_title, { opacity: 0, }); }); if (windowViewPort === "mobile") { $(".team_expert_profile_bw2").on("click", function () { const current_card = $(this); current_card.attr("is_active", "true"); smoothScroll.stop(); }); $(".team_profile_close_icon svg").on("click", function (e) { e.stopPropagation(); const current_card = $(this).closest(".team_expert_profile_bw2"); current_card.attr("is_active", "false"); smoothScroll.start(); }); } } function call_30min_section() { $(".call_30min_section").each(function (index) { const triggerEle = $(this); const phone_icons = $(this).find(".home_cta_phone_icon"); let tl = gsap .timeline({ scrollTrigger: { trigger: triggerEle, start: "top 50%", end: "bottom bottom", // scrub: 0.25 , // markers: true, // once: true, }, }) .from(".home_cta_phone_icon.right", { opacity: 0, x: 50, rotate: 0, }) .from(".home_cta_phone_icon.left", { opacity: 0, x: -50, rotate: 0, }); }); } $("document").ready(function () { hero_section(); call_us_section(); meet_experts_section(); call_30min_section(); if (windowViewPort === "desktop") { } });