-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird startAt behavior? #10
Comments
My original intention was exactly as you described here: ""..but setting this means that the element you want to stick is scrolled over for the first XXXpx until it actually works." If I understand well your desired intention is to have offset from window top - try set Will leave it as it is now. |
navOffset is indeed an offset but not what I am looking for. Let's say this:
However, it looks much better when the element never gets to the top but starts with the fixed position when its already at 50px from top (so it doesn't just flick to the navOffset). I would appreciate it if you add another setting to this, or better: use the current properties (also use navOffset from the top, if a user wants the current behavior again they can add the XXX pixels to startAt and it'll be the same again). |
I understand what's on your mind. I tried to implement this but with no expected result. I therefore removed |
The code I posted (pastebin) in the other thread had the expected behavior. Shouldn't be too hard to replace what I used now (options.startAt) with the navOffset I think. |
Try it now but still not working as you wish. It also breaks active class highlighting so this need to be adjusted as well. |
I will check it out soon. The version I posted on pastebin is what we have live now, it is working as expected with regards to what I describe above. I'll see if I can integrate this again somehow that it's working. |
I'm not entirely sure what startAt is doing
"Stick the menu at XXXpx from the top of the this() (nav container)"
I expected that this would start the sticky element at XXXpx from the top, but setting this means that the element you want to stick is scrolled over for the first XXXpx until it actually works. So, I changed a few things to get what I want:
Now, I don't know what the expected behavior is but if the current implementation is correct, can we get something like this added?
The text was updated successfully, but these errors were encountered: