I have site where I want \'sub navigation\'. So when you scroll to section, its tool bar will affix below the main toolbar. I have this working, but I can\'t change the top offs
I simplified Fatmuemoo's answer slightly for a more basic case: My home page's nav bar (the default bootstrap #masthead) sits below a big background slider with id #bg. The height of the slider varies with 3 css breakpoints. We just set the offset of the #masthead to equal the height of the slider. Easy!
$('header#masthead').affix({ //sticky header at bottom of bg
offset: {
top: function(){return $("#bg").outerHeight();}
}
});