Forums

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

Home Forums JavaScript on scroll up failure

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #250763
    Codi
    Participant

    I have nav bar and it functions just right scrolling down but not when scrolling back up..

    I have been on this for a week and just simply irritated, i have posted every where and no responses. I am gonna use scroll magic for parts of my site. someone said I could use scrollmagic to accomplish my task but I find very little documentation on this specific issue.

    http://codepen.io/codiman/pen/rjJJdE

    if you look at my codepen you will see that my nav links slide in just as i want. then if you scroll down my links scroll up and the nav slides down just as i want.

    Here is the problem if you scroll up the nav does not slide out and the default state of the links dont return the links..

    Also if you scroll down and refresh. the nav disappears until you scroll.

    #250766
    Shikkediel
    Participant

    Edited – here’s a first suggestion for the header sliding out:

    codepen.io/anon/pen/YNeaJj

    The markup might be written much simpler when only a single class would be needed…

    until you scroll

    I just let it fire once when the script loads – with .scroll() at the end there. Still having a look at the other issue.

    #250767
    Codi
    Participant

    I added the offset and remove a class and it works perfectly thank you

    #250768
    Shikkediel
    Participant

    Is the idea that the header ends up underneath the “topbar” below 300px scrolled? Currently it’s sitting on top, that’s why the links aren’t showing. I might not be very accurate in my answers so far because I’m still trying to figure out what the exact behaviour should be.

    Not as bad as pulling a grimski though, such a puzzle might boggle the mind a bit more. Lol.

    css-tricks.com/hidereveal-header-on-scroll

    Edit:

    underneath

    I mean in the y-direction, not z-wise…

    #250769
    Codi
    Participant

    i edited you script a bit and now it works perfect

    i updated the code pen

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