Forums

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

Home Forums JavaScript Shrinking Sticky Nav Issue

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #271609
    dougfromaccounting
    Participant

    Hi all,
    I’m trying to create a shrinking sticky nav. I thought I had a decent foundation working, but I just can’t quite get it to work the way I want it to. https://codepen.io/anon/pen/OZYgLJ

    While I can get the header bar to shrink on scroll, I’m not sure how to get the nested .logo div to shrink with it. I also want to completely hide the .phone div once it shrinks. I’m hoping these functions can be added to the jQuery that I’ve written so far, but I’m not sure how to include them. Also, when I inspect the source and begin scrolling, the UL goes crazy appending classes. That doesn’t seem right to me, although I’m still learning js so I’m not sure. Any help would be greatly appreciated.
    Thanks so much!

    #271611
    JeroenR
    Participant

    When you set the .logo class to height: 100%; and the .logo img to max-height: 100%; you will have a shrinking logo.

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