I am using AngularJS 1.2 and Bootstrap 2.3, although I think it is irrelevant that Angular is involved since this is just jQuery. I want to be able to turn the affix
on and off for a particular element. I have multiple elements on my page using affix
so I can't just disable all instances of the plugin on the page. Also, my problem is unrelated to screen sizes so css is not possible.
For an element for which I have added affix to:
$(element).affix();
Things I have tried that I read about online/stackoverflow to remove the affix, but have been unsuccessful:
$(element).off('.affix');
$(element).removeData('affix').removeClass('affix affix-top affix-bottom');
Is it possible to just remove the affix aspect of this element?
Any help would be great!