Server IP : 162.214.80.37 / Your IP : 216.73.216.68 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/asemyhirings/assets/js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
gsap.registerPlugin(ScrollTrigger, SplitText); gsap.config({ nullTargetWarn: false, trialWarn: false }); function tg_title_animation() { var tg_var = jQuery('.tg-heading-subheading'); if (!tg_var.length) { return; } const quotes = document.querySelectorAll(".tg-heading-subheading .tg-element-title"); quotes.forEach(quote => { //Reset if needed if (quote.animation) { quote.animation.progress(1).kill(); quote.split.revert(); } var getclass = quote.closest('.tg-heading-subheading').className; var animation = getclass.split('animation-'); if (animation[1] == "style4") return quote.split = new SplitText(quote, { type: "lines,words,chars", linesClass: "split-line" }); gsap.set(quote, { perspective: 400 }); if (animation[1] == "style1") { gsap.set(quote.split.chars, { opacity: 0, y: "90%", rotateX: "-40deg" }); } if (animation[1] == "style2") { gsap.set(quote.split.chars, { opacity: 0, x: "50" }); } if (animation[1] == "style3") { gsap.set(quote.split.chars, { opacity: 0, }); } quote.animation = gsap.to(quote.split.chars, { scrollTrigger: { trigger: quote, start: "top 90%", }, x: "0", y: "0", rotateX: "0", opacity: 1, duration: 1, ease: Back.easeOut, stagger: .02 }); }); } ScrollTrigger.addEventListener("refresh", tg_title_animation);