Forums

This topic contains 1 reply, has 2 voices, and was last updated by  Shikkediel 11 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #266927

    goteee
    Participant

    So im trying to replicate this header: https://staffhub.office.com/
    and dont understand how they have made the header animation on scroll while preventing the page from scrolling down. I assume this is possible to do in jquery

    #266928

    Shikkediel
    Participant

    It’ll only work with a mouse (like on that page) – you can use the wheel event for it.

    window.addEventListener('wheel', function(e) {
    
      e.preventDefault(); // page will not scroll
    
      // animation code
    });
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star