I am using Bootstrap 3.1.0. When an \"affix\" gets too long for the viewport, it gets cut off, never showing bottom items.
Is there a possibility to have Bootst
I had the same issue. I spent a few hours and finnaly I wrote the following solution:
$('#sidebar').on('affix.bs.affix', function (e) {
var $this = $(this),
affix = $this.data('bs.affix'),
offset = affix.options.offset,
offsetBottom = offset.bottom;
if (typeof offset != 'object') {
offsetBottom = offset;
}
if (typeof offsetBottom == 'function') {
offsetBottom = offset.bottom($this);
}
if ($this.outerHeight() + $this.offset().top + offsetBottom === Math.max($(document).height(), $(document.body).height())) {
e.preventDefault();
}
});
You can see code at http://jsfiddle.net/F4FZL/10/ and play with demo at https://jsfiddle.net/F4FZL/10/embedded/result/.
Hope this information will be helpful.