Jump to content
Search Community

Search the Community

Showing results for tags 'nav logo'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. I'm working on a site and am wanting the logo to transition into the navbar on scroll. For some reason I've been running into a lot of bugs and can't get it to work correctly. Any help would be appreciated. I was originally trying to get it to work using a scrolltrigger scrub animation but that was having even more issues. The site is here: https://lvly-tv.webflow.io/ and the code I'm using is below: Any help would be appreciated. const homeLogoScroll = function () { const logo = document.querySelector('.hero_home_logo'); // const logoChildren = logo.querySelectorAll('*'); const heroLogoWrap = document.querySelector('.hero_home_logo_wrap'); const navLogoWrap = document.querySelector('.nav_logo'); const heroSection = document.querySelector('.hero_home_wrap'); if (!logo || !heroLogoWrap || !navLogoWrap) return; const updateLogo = function (moveToHero = false) { let state = Flip.getState(logo, { nested: true }); //move element if (moveToHero) { heroLogoWrap.insertAdjacentElement('beforeend', logo); } else { navLogoWrap.insertAdjacentElement('beforeend', logo); } // animate element Flip.from(state, { absolute: true, // scale: true, duration: 0.6, ease: 'power1.inOut', }); }; updateLogo(true); let tl = gsap.timeline({ scrollTrigger: { trigger: heroSection, start: 'center 45%', end: 'bottom 100%', scrub: true, markers: false, onEnter: () => { updateLogo(false); }, onEnterBack: () => { updateLogo(true); }, }, }); };
×
×
  • Create New...