Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Hide/reveal header on scroll (works but a bit jumpy)

  • This topic is empty.
Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #252004
    grimski
    Participant

    Sorry man, you know me, terrible when it comes to understanding javascript haha!

    So…

    if (currentScroll > detachPoint) header.addClass('detached');

    would be come (on the 8th line the last code I pasted):

    `if ($(this).scrollTop() > detachPoint) header.addClass(‘detached’);

    Is that about right?

    #252009
    Shikkediel
    Participant

    Yep, that’s it. :-)

    #252079
    grimski
    Participant

    Thanks man, that’s great! :)

Viewing 3 posts - 16 through 18 (of 18 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.