Christopher Jazinski Christopher Jazinski - 10 months ago 109
Javascript Question

Twitter Bootstrap affix events not firing

I'm trying to affix a toolbar when the user scrolls passed it. The affix portion works fine however I want to adjust the padding on my main container when the affix class actually get applied. Has some events listed However; I can't get any of them to fire. The JSfiddle doesn't look right I'm guessing cuz of the size. But essentially none of those events get fired when the affix is applied to the #nav.

$('#nav').on('', function () {

You can see more of my code here.. Its essentially just the navbar given in the BS example.

Answer Source

The event fires when the affixed element is scrolled so if you scroll the page:

This event fires immediately before the element has been affixed.

so make your page content higher.