How do I change the offset of Affix (Twitter Bootstrap 3) to another value?
When I tried to call the method twice like this, the second one seems to be ignored and does not have any effect:
$('#navbar-main').affix({ offset: 100});
$('#navbar-main').affix({ offset: 200}); // ---> the offset will not change to 200px
Resetting the .affix
callback before calling affix
the second time didn't help either:
$('#navbar-main').affix({ offset: 100});
$(window).off('.affix');
$('#navbar-main').affix({ offset: 200}); // ---> the offset will not change to 200px