I am using Bootstrap 3 Affix feature,
But cannot figure out how the data-offset-bottom
works actually.
I have a potentially long main column, and a smaller one which contains an affixed nav.
My problem is that the affixed nav might be too long for some screen sizes, so I would like the user to be able to see the current item when scrolling down, which kind of works, even if I have to tweak the data-offset-bottom I guess ;
However, when you scrolls up from the bottom, the affix "disappear", because it gets a position: relative;
from any JS code (I guess, from Bootstrap), which I would like to avoid.
Any idea about it ? Should I replace the fixed values of data-attributes by a function which would dynamically reset the offset depending of the scroll ? It does not seem to be the cleanest way to solve it.
http://jsfiddle.net/FloSchieldBobby/oz6nq6tL/
To see what I am talking about, just scroll completely down, then scrolls up again.