ScrollToFixed
ScrollToFixed copied to clipboard
How to combine bottom:0 and marginTop?
Hi, i have navigation that should be put at bottom:0 at initial page, after some "limit" then navigation follow to scroll upside, after that i want to put margin top so now the navigation fixed at top .. but my code seems not work, after navigation scroll to up, then its keep scrolling up until its gone
Here's my code
$(function() {
$('#header').scrollToFixed();
$('#model-sub-nav').scrollToFixed({
marginTop: $('#header').outerHeight(true),
// limit: $('#overview').offset().top,
// bottom: 0,
zIndex: 999
});
})
Thanks :)
Would it be possible to have a link to your page? I am unable to be of much help with just the code snip above.
Thanks!
Here we go http://bit.ly/1peDkag
I want to make menu navbar at fixed bottom (Overview, Fitur, etc) but then must fixed to top before main header when scroll down
Thanks
Great looking website!
Just so I understand correctly, you would like #model-sub-nav fixed at the bottom when the site first renders, then you want it under the main header. How will it travel from the bottom of the page to the top of the page? Will it:
- jump under the header as soon as the user scrolls,
- travel with the scroll until it docks under the header,
- something else
I love what you have it doing now and I think that is making me not see another way to do it :)
Thanks a lot :)
I want to make it like your second number, so user will scroll down, and #model-sub-nav will follow it until fixed at top under main header :)
Btw great plugin, save a lot of time!
:)