I\'m migrating to bootstrap 3.0.0 and I\'m having issues with an affixed menu to the left: as soon as it becomes affixed (after 10px scroll), its width changes. In this fiddle i
My solution as well:
$('.menu-card').affix();
$(document).on('affix.bs.affix', '.menu-card', function() {
$(this).width($(this).width());
});
(.menu-card is my sticky div)
I added this for supporting the window resizing:
Let's assume the affix are in a parent div #menu-card-pane.
$(window).resize(function () {
var parentSize = $('#menu-card-pane').width();
$('.affix').each(function() {
var affixPadding = $(this).innerWidth() - $(this).width();
$(this).width(parentSize - affixPadding);
});
});