Scroll down this page.
The affix.bs.affix event occurs when the .affix-top class is about to be replaced with the .affix class.