1/* 2 Author: themexriver 3 Version: 1.0 4*/ 5 6 7(function ($) { 8"use strict"; 9 10 11 12// smoooth scroll activation start 13const lenis = new Lenis() 14 15 16lenis.on('scroll', ScrollTrigger.update); 17gsap.ticker.add((time) => { 18 lenis.raf(time * 1000) 19}); 20gsap.ticker.lagSmoothing(0); 21 22 23// preloader 24document.addEventListener("DOMContentLoaded", function () { 25 26 let preloader = document.querySelector("#preloader"); 27 28 window.addEventListener('load', function(){ 29 30 if (preloader) { 31 preloader.classList.add("preloaded"); 32 setTimeout(function () { 33 preloader.remove(); 34 }, 1000 ) ; 35 36 } 37 38 // h1-start 39 const fdh1 = gsap.timeline(); 40 fdh1.from(".fd-hero-1-slideup " , { stagger: .5, y: 100 , duration:1, opacity:0 , delay: 1.5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }) 41 fdh1.from(".fd-hero-1-slideleft " , { stagger: .5, x: -100 , duration:1, opacity:0 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, "<.5") 42 fdh1.from(".fd-hero-1-slideright " , { stagger: .5, x: 100 , duration:1, opacity:0 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, "<=") 43 44 // h2-start 45 const fdh2 = gsap.timeline(); 46 fdh2.from(".fd-hero-2-slidedown " , { stagger: .3, y: 100 , duration:1, opacity:0 , delay: 1, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, "<.5") 47 fdh2.from(".fd-hero-2-slideleft " , { stagger: .3, x: -100 , duration:1, opacity:0 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, "<.5") 48 fdh2.from(".fd-hero-2-slideright " , { stagger: .3, x: 100 , duration:1, opacity:0 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, "<.5") 49 50 // h3-start 51 const fdh3 = gsap.timeline(); 52 fdh3.from(".fd-hero-3-slide-down" , { stagger: .4, y: 100 , duration:1, opacity:0 , delay: 1, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }) 53 54 // h4-start 55 const fdh4 = gsap.timeline(); 56 fdh4.from(".fd-hero-4-bg" , { scale: 0, transformOrigin: "center 20%" , duration: 1.2 , delay: 1 }) 57 .from(".fd-hero-4-title" , { y: 100, opacity: 0, duration:.7 , delay: .3 }) 58 .from(".fd-hero-4-disc" , { y: 100, opacity: 0, duration:.7 },"<=.3") 59 .from(".fd-hero-4-btn" , { y: 100, opacity: 0, duration:.7 }, "<=.3") 60 61 62 63 // hero-4 64 if($('.fd-hero-4-active').length) { 65 let slider = new Swiper('.fd-hero-4-active', { 66 loop: true, 67 spaceBetween: 0, 68 speed: 1000, 69 autoplay: { 70 delay: 4000, 71 }, 72 73 direction: 'vertical', 74 75 }); 76 } 77 78 // h4-start 79 const fdh5 = gsap.timeline(); 80 fdh5.from("[fd-h5-img-down]" , { yPercent: 100, duration: 1 , delay: 1 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }) 81 fdh5.from("[fd-h5-slide-left]" , { opacity: 0, x: -200, duration: 1 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }) 82 .from("[fd-h5-slide-down]" , { opacity: 0, y: 200, duration: 1 , stagger: .3 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, "<=") 83 84 fdh5.from("[fd-h5-img-down]" , { filter: "hue-rotate(360deg)", duration: 3 , ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, "<" ) 85 86 // breadcrumb 87 const breadcrumb = gsap.timeline(); 88 breadcrumb.from("[fd-breadcrumb-s-d]" , { opacity: 0, y: 200, duration: 1 , stagger: .3 , delay: 1, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }) 89 90 91 }) 92 93}); 94 95// sticky-header 96function glystickyHeader() { 97 var $window = $(window); 98 var lastScrollTop = 0; 99 var $header = $('.txa_sticky_header'); 100 var headerHeight = $header.outerHeight() + 30; 101 102 $window.scroll(function () { 103 var windowTop = $window.scrollTop(); 104 105 if (windowTop >= headerHeight) { 106 $header.addClass('txa_sticky'); 107 } else { 108 $header.removeClass('txa_sticky'); 109 $header.removeClass('txa_sticky_show'); 110 } 111 112 if ($header.hasClass('txa_sticky')) { 113 if (windowTop < lastScrollTop) { 114 $header.addClass('txa_sticky_show'); 115 } else { 116 $header.removeClass('txa_sticky_show'); 117 } 118 } 119 120 lastScrollTop = windowTop; 121 });
122} 123 124glystickyHeader(); 125 126 127 128// mobile-menu-start 129jQuery(".mobile-main-navigation li.dropdown").append('<span class="dropdown-btn"><i class="fa-solid fa-angle-right"></i></span>'), 130 jQuery(".mobile-main-navigation li .dropdown-btn").on("click", function () { 131 jQuery(this).hasClass("active") 132 ? (jQuery(this).closest("ul").find(".dropdown-btn.active").toggleClass("active"), jQuery(this).closest("ul").find(".dropdown-menu.active").toggleClass("active").slideToggle()) 133 : (jQuery(this).closest("ul").find(".dropdown-btn.active").toggleClass("active"), 134 jQuery(this).closest("ul").find(".dropdown-menu.active").toggleClass("active").slideToggle(), 135 jQuery(this).toggleClass("active"), 136 jQuery(this).parent().find("> .dropdown-menu").toggleClass("active"), 137 jQuery(this).parent().find("> .dropdown-menu").slideToggle()); 138}); 139$('.open_menu').on("click", function() { 140 $('.mobile-menu').toggleClass("mobile_menu_on"); 141}); 142 143$('.open_menu').on('click', function () { 144 $('body').toggleClass('mobile_menu_overlay_on'); 145}); 146 147if($('.mobile_menu li.dropdown ul').length){ 148 $('.mobile_menu li.dropdown').append('<div class="dropdown-btn"><span class="fas fa-caret-right"></span></div>'); 149 $('.mobile_menu li.dropdown .dropdown-btn').on('click', function() { 150 $(this).prev('ul').slideToggle(500); 151 }); 152} 153 154$(".dropdown-btn").on("click", function () { 155 $(this).toggleClass("toggle-open"); 156}); 157$(document).on('keydown', function(e) { 158 if (e.keyCode === 27) { 159 $('.mobile-menu').removeClass("mobile_menu_on"); 160 $('body').removeClass('mobile_menu_overlay_on'); 161 } 162}); 163 164// search-popup-start 165$('.search_btn_toggle').on('click', function() { 166 $('.overlay, .search_1_popup_active').addClass('active'); 167}); 168$('.overlay, .search_1_popup_close').on('click', function() { 169 $('.search_1_popup_active').removeClass('active'); 170 $('.overlay').removeClass('active'); 171}) 172 173 174 175// mobile-menu-toggle-start 176gsap.registerPlugin(ScrollTrigger); 177gsap.config({ 178 nullTargetWarn: false, 179}); 180 181// fd-services-4 182if (window.innerWidth >= 992 ) { 183 var fdhero2 = gsap.timeline({ 184 185 scrollTrigger: { 186 animation: fdhero2, 187 trigger: '.fd-services-4-img-grid', 188 start: "top 10%", 189 scrub: 1, 190 toggleActions: "play reverse play reverse", 191 pin: true, 192 pinSpacing: true, 193 markers: false 194 } 195 }); 196 fdhero2.to(".fd-services-4-img-grid " , { x: "-30%", duration:1, ease: "ease", }) 197 .to(".fd-services-4-img-big" , { opacity: 0, duration:.1, ease: "ease", }, "<=") 198} 199 200 201function workFlowActive($scope, $) { 202 if (window.innerWidth >= 992) { 203 const composeTl = gsap.timeline({ 204 scrollTrigger: { 205 trigger: ".fd-benifit-workflow-area", 206 start: "top 0%", 207 end:'bottom 0%', 208 scrub: 1, 209 pinSpacing: true, 210 pin: true, 211 toggleActions: "play pause reverse reset", 212 markers: false, 213 } 214 }); 215 216 composeTl.to(".fd-benifit-1-content", { 217 218 opacity: 0, 219 y: "-100%", 220 scale: 0.8, 221 duration: 1, 222 }) 223 224 composeTl.from(".fd-workflow-1-img-wrap", { 225 opacity: 1, 226 y: "100%", 227 scale: 0.8, 228 duration: 1, 229 }, "<") 230 231 232 233 composeTl.to(".fd-benifit-1-img-2", { 234 opacity: 0, 235 y: "-100%", 236 scale: 0.8, 237 duration: 1, 238 }) 239 240 241 242 composeTl.from(".fd-workflow-1-content", { 243 opacity: 1, 244 y: "100%", 245 scale: 0.8, 246 duration: 1, 247 }, "<") 248 249 } 250} 251 252 253 254 255// showcase-3 256 257function appScreenActive($scope, $) { 258 if (window.innerWidth >= 992) { 259 if($('.races').length) { 260 261 const races = document.querySelector(".races"); 262 console.log(races.offsetWidth) 263 264 function getScrollAmount() { 265 let racesWidth = races.scrollWidth; 266 return -(racesWidth - window.innerWidth); 267 } 268 269 const tween = gsap.to(races, { 270 x: getScrollAmount, 271 duration: 3, 272 ease: "none", 273 }); 274 275 276 ScrollTrigger.create({ 277 trigger:".racesWrapper", 278 start:"top 5%", 279 end: () =>
279 `+=${getScrollAmount() * -1}`, 280 pin:false, 281 animation:tween, 282 scrub:1, 283 invalidateOnRefresh:true, 284 markers:false 285 }) 286 287 } 288 } 289} 290 291 292 293// title-animation 294if($('.txaa-split-subtitle-1').length) { 295 var st1 = $(".txaa-split-subtitle-1"); 296 if(st1.length == 0) return; gsap.registerPlugin(SplitText); st1.each(function(index, el) { 297 298 el.split = new SplitText(el, { 299 type: "lines,words,chars", 300 linesClass: "split-line" 301 }); 302 303 gsap.set(el, { perspective: 400 }); 304 305 if( $(el).hasClass('txaa-ani-subtitle-1') ){ 306 gsap.set(el.split.words, { 307 opacity: 1, 308 y: "-150", 309 310 }); 311 } 312 313 el.anim = gsap.to(el.split.words, { 314 scrollTrigger: { 315 trigger: el, 316 start: "top 90%", 317 }, 318 319 x: "0", 320 y: "0", 321 opacity: 1, 322 duration: .7, 323 ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 "), 324 stagger: 0.2, 325 delay: 1 326 }); 327 328 }); 329} 330 331if($('.txaa-split-subtitle-2').length) { 332 333 var st2 = $(".txaa-split-subtitle-2"); 334 335 if(st2.length == 0) return; gsap.registerPlugin(SplitText); st2.each(function(index, el) { 336 337 el.split = new SplitText(el, { 338 type: "lines,words,chars", 339 linesClass: "split-line" 340 }); 341 342 gsap.set(el, { perspective: 400 }); 343 344 if( $(el).hasClass('txaa-ani-subtitle-2') ){ 345 gsap.set(el.split.words, { 346 opacity: 1, 347 y: "-100", 348 349 }); 350 } 351 352 el.anim = gsap.to(el.split.words, { 353 scrollTrigger: { 354 trigger: el, 355 start: "top 90%", 356 markers: false, 357 }, 358 359 x: "0", 360 y: "0", 361 opacity: 1, 362 duration: .5, 363 ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 "), 364 stagger: 0.1, 365 }); 366 367 }); 368} 369 370if($('.txaa-split-subtitle-3').length) { 371 372 var st2 = $(".txaa-split-subtitle-3"); 373 374 if(st2.length == 0) return; gsap.registerPlugin(SplitText); st2.each(function(index, el) { 375 376 el.split = new SplitText(el, { 377 type: "lines,words,chars", 378 linesClass: "split-line" 379 }); 380 381 gsap.set(el, { perspective: 400 }); 382 383 if( $(el).hasClass('txaa-ani-subtitle-3') ){ 384 gsap.set(el.split.words, { 385 opacity: 1, 386 y: "-100", 387 388 }); 389 } 390 391 el.anim = gsap.to(el.split.words, { 392 scrollTrigger: { 393 trigger: el, 394 start: "top 90%", 395 markers: false, 396 }, 397 398 x: "0", 399 y: "0", 400 opacity: 1, 401 duration: .7, 402 ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 "), 403 stagger: 0.2, 404 delay: 3 405 }); 406 407 }); 408} 409 410 411const txaafadedown = gsap.utils.toArray('.txaafadedown'); 412txaafadedown.forEach((box, i) => { 413 const anim = gsap.fromTo(box, 414 415 { y: 100 , duration: 1, autoAlpha: 0, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 416 { y: 0 , duration: 1, autoAlpha: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 417 418 ScrollTrigger.create({ 419 trigger: box, 420 start: "top 95%", 421 animation: anim, 422 toggleActions: 'play none none reverse', 423 once: false, 424 425 markers: false, 426 427 }); 428}); 429 430const txaafadeleft = gsap.utils.toArray('.txaafadeleft'); 431txaafadeleft.forEach((box, i) => { 432 const anim = gsap.fromTo(box, 433 434 { x: -100 , duration: 1, autoAlpha: 0, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 435 { x: 0 , duration: 1, autoAlpha: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 436 437 ScrollTrigger.create({ 438 trigger: box, 439 start: "top 90%", 440 animation: anim, 441 toggleActions: 'play none none reverse', 442 once: false, 443 444 markers: false, 445 446 }); 447}); 448 449const txaafaderight = gsap.utils.toArray('.txaafaderight'); 450txaafaderight.forEach((box, i) => { 451 const anim = gsap.fromTo(box, 452 453 { x: 100 , duration: .5, autoAlpha: 0, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 454 { x: 0 , duration: .5, autoAlpha: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 455 456 ScrollTrigger.create({ 457 trigger: box, 458 start: "top 90%", 459 animation: anim, 460 toggleActions: 'play none none reverse', 461 once: false, 462 463 markers: false, 464 465 }); 466}); 467 468const txaaslideleft = gsap.utils.toArray('.txaaslideleft'); 469txaaslideleft.forEach((box, i) => { 470 const anim = gsap.fromTo(box, 471 472 { x: -200 , duration: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 473 { x: 0 , duration: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 474 475 ScrollTrigger.create({ 476 trigger: box, 477 start: "top 90%", 478 animation: anim, 479 toggleActions: 'play none none reverse', 480 once: false, 481 482 markers: false, 483 484 }); 485}); 486 487const txaascale2 = gsap.utils.toArray('.txaascale2'); 488txaascale2.forEach((box, i) => { 489 const anim = gsap.fromTo(box, 490 491 { scale: 2 , duration: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 492 { scale: 1 , duration: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 493 494 ScrollTrigger.create({ 495 trigger: box, 496 start: "top 85%", 497 animation: anim, 498 toggleActions: 'play none none reverse', 499 once: false, 500 501 markers: false, 502 503 }); 504}); 505 506const txaascale0 = gsap.utils.toArray('.txaascale0');
507txaascale0.forEach((box, i) => { 508 const anim = gsap.fromTo(box, 509 510 { scale: 0 , duration: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 511 { scale: 1 , duration: 1, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 512 513 ScrollTrigger.create({ 514 trigger: box, 515 start: "top 85%", 516 animation: anim, 517 toggleActions: 'play none none reverse', 518 once: false, 519 520 markers: false, 521 522 }); 523}); 524 525const txaasx0 = gsap.utils.toArray('.txaasx0'); 526txaasx0.forEach((box, i) => { 527 const anim = gsap.fromTo(box, 528 529 { scaleX: 0 , duration: 3, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 530 { scaleX: 1 , duration: 3, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 531 532 ScrollTrigger.create({ 533 trigger: box, 534 start: "top 85%", 535 animation: anim, 536 toggleActions: 'play none none reverse', 537 once: false, 538 markers: false, 539 540 }); 541}); 542 543const txaay0 = gsap.utils.toArray('.txaay0'); 544txaay0.forEach((box, i) => { 545 const anim = gsap.fromTo(box, 546 547 { scaleY: 0 , duration: 3, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }, 548 { scaleY: 1 , duration: 3, stagger: .5, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 549 550 ScrollTrigger.create({ 551 trigger: box, 552 start: "top 85%", 553 animation: anim, 554 toggleActions: 'play none none reverse', 555 once: false, 556 557 markers: false, 558 559 }); 560}); 561 562 563// overview-1 564gsap.utils.toArray('.fd-overview-1-img').forEach((el, index) => { 565 let tl1 = gsap.timeline({ 566 scrollTrigger: { 567 trigger: el, 568 scrub: 1, 569 start: "top 85%", 570 end: "top 50%", 571 toggleActions: "play none none reverse", 572 markers: false 573 } 574 }) 575 576 tl1 577 .from(el, { x: 100 , y: 100 , scale: .5 }, {opacity: 1, duration: 1, immediateRender: false}) 578}) 579 580 581// fd-fade-down 582gsap.utils.toArray('.txaaslideup').forEach((el, index) => { 583 let tl1 = gsap.timeline({ 584 scrollTrigger: { 585 trigger: el, // Updated to use the individual element 586 start: "top 90%", 587 toggleActions: "play none none reverse", 588 markers: false 589 } 590 }); 591 592 tl1.from(el, { 593 opacity: 0, // Changed initial opacity to 0 for a fade-in effect 594 yPercent: 100, 595 duration: 1, 596 ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") 597 }); 598}); 599 600 601 602// fd-hero-2 603if (window.innerWidth >= 992 ) { 604 var fdhero2 = gsap.timeline({ 605 606 scrollTrigger: { 607 animation: fdhero2, 608 trigger: '.fd-hero-2-area', 609 start: "top -30%", 610 scrub: 1, 611 toggleActions: "play reverse play reverse", 612 markers: false 613 } 614 }); 615 fdhero2.to(".fd-hero-2-img-grid" , { x: "-30%", duration:1, ease: "ease", }) 616 .to(".fd-hero-2-img-big" , { opacity: 0, duration:.1, ease: "ease", }, "<=") 617} 618 619 620// fd-hero-3 621if (window.innerWidth >= 768) { 622 var fdhero3 = gsap.timeline({ 623 624 scrollTrigger: { 625 animation: fdhero3, 626 trigger: '.fd-hero-3-area', 627 start: "top 0%", 628 scrub: 1, 629 toggleActions: "play reverse play reverse", 630 markers: false 631 } 632 }); 633 fdhero3.to(".fd-hero-3-img-grid" , { scale: 1.2, duration:1, ease: "ease", }) 634} 635 636 637 638// cta-3 639var fdcta3 = gsap.timeline({ 640 641 scrollTrigger: { 642 animation: fdcta3, 643 trigger: '.fd-video-3-area', 644 start: "top 80%", 645 end: "top 20%", 646 scrub: 1, 647 toggleActions: "play reverse play reverse", 648 markers: false 649 } 650}); 651fdcta3.from(".fd-video-3-area" , { width: "50%", duration:1, ease: "ease", }) 652 653 654// fd-benifit-4 655if (window.innerWidth >= 992) { 656 var fdbenifit4 = gsap.timeline({ 657 658 scrollTrigger: { 659 animation: fdbenifit4, 660 trigger: '.fd-benifit-4-area', 661 start: "top 60%", 662 end: "top 30%", 663 scrub: 1, 664 toggleActions: "play reverse play reverse", 665 markers: false 666 } 667 }); 668 fdbenifit4.from(".fd-benifit-4-container" , { padding: 0, gap: 0, duration:1, ease: "ease", }) 669 .from(".fd-benifit-2-content " , { borderRadius: 0, duration:1, ease: "ease", }, "<=") 670} 671 672 673// fd-feature-4 674var fdfeature4 = gsap.timeline({ 675 676 scrollTrigger: { 677 animation: fdfeature4, 678 trigger: '.fd-feature-4-area', 679 start: "top 60%", 680 end: "top 10%", 681 scrub: 1, 682 toggleActions: "play reverse play reverse", 683 markers: false 684 } 685}); 686fdfeature4.from(".fd-feature-4-bg" , { padding: 0, duration:1, ease: "ease", }) 687.from(".fd-feature-4-bg img" , { borderRadius: 0, duration:1, ease: "ease", }) 688 689 690const txaapadding0 = gsap.utils.toArray('.txaapadding0');
691txaapadding0.forEach((box, i) => { 692 const anim = gsap.from(box, 693 694 { padding: 0 , duration: 1, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 ") }); 695 696 ScrollTrigger.create({ 697 trigger: box, 698 start: "top 60%", 699 end: "top 20%", 700 animation: anim, 701 toggleActions: 'play none none reverse', 702 once: false, 703 scrub: 1, 704 markers: false, 705 706 }); 707}); 708 709// fd-brand-4 710if (window.innerWidth >= 992) { 711 var fdbrand4 = gsap.timeline({ 712 713 scrollTrigger: { 714 animation: fdbrand4, 715 trigger: '.fd-brand-4-wrap', 716 start: "top 80%", 717 toggleActions: "play reverse play reverse", 718 markers: false 719 } 720 }); 721 fdbrand4.from(".fd-brand-4-social-single" , { opacity: 0, scale: .3, y: -300, stagger: .2, duration:.3, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 "), }) 722 fdbrand4.from(".fd-brand-4-social-sm" , { opacity: 0 , scale: .5, y: -300, stagger: .3, duration:.3, ease: CustomEase.create("custom", "M0,0 C0.126,0.382 0.447,0.77 0.621,1 0.646,1.032 0.818,1.001 1,1 "), }) 723} 724 725// overview-6 726if (window.innerWidth >= 992 ) { 727 var overview6 = gsap.timeline({ 728 729 scrollTrigger: { 730 animation: overview6, 731 trigger: '.fd-overview-6-screen', 732 start: "top 70%", 733 toggleActions: "play reverse play reverse", 734 markers: false 735 } 736 }); 737 overview6.from(".fd-o6-s1" , { transform: "translate(700px, 0px) rotate(0deg)", opacity: 0, duration:1, ease: "ease", }) 738 overview6.from(".fd-o6-s2" , { transform: "translate(360px, 0px) rotate(0deg)", opacity: 0, duration:1, ease: "ease", }, "<=") 739 overview6.from(".fd-o6-s4" , { transform: "translate(-360px, 0px) rotate(0deg)", opacity: 0, duration:1, ease: "ease", }, "<=") 740 overview6.from(".fd-o6-s5" , { transform: "translate(-700px, 0px) rotate(0deg)", opacity: 0, duration:1, ease: "ease", }, "<=") 741} 742 743// course-1-slider 744if($('.fd-feature-1-active').length) { 745 let slider = new Swiper('.fd-feature-1-active', { 746 loop: true, 747 spaceBetween: 20, 748 direction: "vertical", 749 mousewheel: true, 750 speed: 2000, 751 autoplay: { 752 delay: 5000, 753 }, 754 755 pagination: { 756 el: ".fd-feature-1-pagination", 757 clickable: true, 758 }, 759 760 }); 761} 762 763 764 function testimonialActive($scope, $) { 765 if($('.fd-testionial-2-active').length) { 766 let slider = new Swiper('.fd-testionial-2-active', { 767 loop: true, 768 spaceBetween: 30, 769 speed: 1000, 770 autoplay: { 771 delay: 3000, 772 }, 773 774 breakpoints: { 775 0: { 776 slidesPerView: 1, 777 }, 778 576: { 779 slidesPerView: 1, 780 }, 781 768: { 782 slidesPerView: 2, 783 }, 784 992: { 785 slidesPerView: 3, 786 }, 787 1200: { 788 slidesPerView: 3, 789 }, 790 }, 791 }); 792 } 793 } 794 795 796// testimonial-3-slider 797if($('.fd-testimonial-3-active').length) { 798 let slider = new Swiper('.fd-testimonial-3-active', { 799 loop: true, 800 spaceBetween: 0, 801 speed: 1000, 802 autoplay: { 803 delay: 4000, 804 }, 805 806 807 navigation: { 808 nextEl: ".testimonial_3_next", 809 prevEl: ".testimonial_3_prev", 810 }, 811 812 }); 813} 814 815 816// price-3-slider 817if($('.fd-price-3-active').length) { 818 let slider = new Swiper('.fd-price-3-active', { 819 loop: true, 820 spaceBetween: 0, 821 speed: 1000, 822 autoplay: { 823 delay: 4000, 824 }, 825 826 pagination: { 827 el: ".fd-price-3_pagination", 828 clickable: true, 829 }, 830 831 }); 832} 833 834 835 836if($('.fd-price-3-active2').length) { 837 let slider = new Swiper('.fd-price-3-active2', { 838 loop: true, 839 spaceBetween: 0, 840 speed: 1000, 841 autoplay: { 842 delay: 4000, 843 }, 844 845 pagination: { 846 el: ".fd-price-3_pagination2", 847 clickable: true, 848 }, 849 850 }); 851} 852 853 854 855// brand-3 856if($('.fd-brand-3-active').length) { 857 let slider = new Swiper('.fd-brand-3-active', { 858 loop: true, 859 spaceBetween: 0, 860 speed: 1000, 861 autoplay: { 862 delay: 4000, 863 }, 864 865 breakpoints: { 866 0: { 867 slidesPerView: 1, 868 }, 869 576: { 870 slidesPerView: 2, 871 }, 872 768: { 873 slidesPerView: 3, 874 }, 875 992: { 876 slidesPerView: 4, 877 }, 878 1200: { 879 slidesPerView: 5, 880 }, 881 }, 882 883 }); 884} 885 886// blog-img 887if($('.fd-blog-img-active').length) { 888 let slider = new Swiper('.fd-blog-img-active', { 889 loop: true, 890 spaceBetween: 0, 891 speed: 500, 892 autoplay: { 893 delay: 4000, 894 }, 895 896 navigation: { 897 nextEl: ".blog_img_next", 898 prevEl: ".blog_img_prev", 899 }, 900 901 }); 902} 903 904 905 906// cursor-follow 907var mWrap = $(".fd-video-3-area"); 908 909mWrap.hover(function () { 910 var mContent = $(this).find("#magnetic-content"); 911 var mArea = $(this).find("#magnetic-area"); 912 913 function parallaxIt(e, target, movement = 1) { 914 var scrollTop = window.pageYOffset || document.documentElement.scrollTop; 915 var boundingRect = mArea[0].getBoundingClientRect(); 916 var relX = e.pageX - boundingRect.left; 917 var relY = e.pageY - boundingRect.top; 918 919 gsap.to(mContent, { 920 x: (relX - boundingRect.width / 2) * movement, 921 y: (relY - boundingRect.height / 2 - scrollTop) * movement, 922 ease: "none", 923 duration: 1 924 }); 925 } 926 927 function callParallax(e) { 928 parallaxIt(e, mWrap); 929 } 930 931 mArea.mousemove(function (e) { 932 callParallax(e); 933 }); 934 935 mArea.mouseleave(function (e) { 936 gsap.to(mContent, { 937 scale: 1, 938 x: 0, 939 y: 0, 940 ease: "none", 941 duration: 1 942 }); 943 }); 944 945}); 946 947 948// price-toggle 949$(".fd-price-3-toggle-js").change(function() { 950 if(this.checked) { 951 952 $('.js-montlypricing').css('display', 'none'); 953 $('.js-yearlypricing').css('display', 'block'); 954 $('.afterinput').addClass('is-active'); 955 $('.beforeinput').removeClass('is-active'); 956 957 } else { 958 959 $('.js-montlypricing').css('display', 'block'); 960 $('.js-yearlypricing').css('display', 'none'); 961 $('.afterinput').removeClass('is-active'); 962 $('.beforeinput').addClass('is-active'); 963 964 } 965}); 966 967/* 968 price-1-active-class 969*/ 970$(".kd-price-1-table-feature-item").on("click", function(){ 971 var current_class = document.getElementsByClassName("kd-price-1-table-feature-item active"); 972 current_class[0].className = current_class[0].className.replace(" active", ""); 973 this.className += " active"; 974}); 975 976/* 977 marquee-activiton 978*/ 979$('.js-marquee-wrapper').marquee({ 980 speed: 50, 981 gap: 12, 982 delayBeforeStart: 0, 983 direction: 'left', 984 duplicated: true, 985 pauseOnHover: true, 986 startVisible:true, 987}) 988 989$('.js-marquee-wrapper-2').marquee({ 990 speed: 50, 991 gap: 12, 992 delayBeforeStart: 0, 993 direction: 'right', 994 duplicated: true, 995 pauseOnHover: true, 996 startVisible:true, 997}) 998 999/* 1000 mouse-move-animation 1001*/ 1002 1003document.addEventListener("mousemove" , parallax); 1004function parallax(e){ 1005 1006 document.querySelectorAll(".txa-mm-elm").forEach(function(move){ 1007 1008 var moving_value = move.getAttribute("data-value"); 1009 var x = (e.clientX * moving_value) /250; 1010 var y = (e.clientY * moving_value) /250; 1011
1012 move.style.transform = "translateX(" + x + "px) translateY(" + y +"px)"; 1013 }) 1014 1015} 1016 1017 1018// bootstrap-toltip 1019$(function () { 1020 $('[data-toggle="tooltip"]').tooltip() 1021}) 1022 1023/* back-to-top */ 1024var backtotop = $('.scroll-top'); 1025 1026$(window).scroll(function() { 1027 if ($(window).scrollTop() > 300) { 1028 backtotop.addClass('show'); 1029 } else { 1030 backtotop.removeClass('show'); 1031 } 1032}); 1033 1034backtotop.on('click', function(e) { 1035 e.preventDefault(); 1036 $('html, body').animate({scrollTop:0}, '700'); 1037}); 1038 1039 1040/* counter */ 1041$('.counter').counterUp({ 1042 delay: 10, 1043 time: 3000 1044}); 1045 1046/* data-bg-activition */ 1047$("[data-background]").each(function(){ 1048 $(this).css("background-image","url("+$(this).attr("data-background") + ") ") 1049}) 1050 1051// wow-splitting-text 1052Splitting(); 1053 1054// wow-activation 1055if($('.wow').length){ 1056 var wow = new WOW( 1057 { 1058 boxClass: 'wow', 1059 animateClass: 'animated', 1060 offset: 0, 1061 mobile: true, 1062 live: true 1063 } 1064 ); 1065 wow.init(); 1066}; 1067 1068 1069/* 1070popup-video-activition 1071====start==== 1072*/ 1073 1074if($('.popup-video').length) { 1075 $('.popup-video').magnificPopup({ 1076 type: 'iframe' 1077 }); 1078} 1079 1080 1081/* 1082popup-img-activition 1083====start==== 1084*/ 1085 1086if($('.popup_img').length) { 1087 $('.popup_img').magnificPopup({ 1088 type: 'image', 1089 gallery: { 1090 enabled: true, 1091 }, 1092 }); 1093} 1094 1095/* 1096popup-img-activition 1097====start==== 1098*/ 1099if($('.nice-select').length) { 1100 $('.nice-select select').niceSelect(); 1101} 1102 1103// parallax-img 1104$('.parallax-img').parallaxie({ 1105 speed: 0.5, 1106}); 1107 1108// home-5 1109 1110 1111$(window).on('elementor/frontend/init', function () { 1112 elementorFrontend.hooks.addAction('frontend/element_ready/go-workflow-section.default', workFlowActive); 1113 elementorFrontend.hooks.addAction('frontend/element_ready/go-app-screen.default', appScreenActive); 1114 elementorFrontend.hooks.addAction('frontend/element_ready/go-testimonial-carousel.default', testimonialActive); 1115}); 1116 1117 1118})(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.