0

I have a page using Bootstrap 3 and Snap.js library (https://github.com/jakiestfu/Snap.js/).

I need to have a navbar with affix.

Unfortunately, affix seems to work using window.scroll element, that is not working in this case (i'm wondering why, if I log window.pageYOffset every second it remains fixed to zero and it never fires window.onscroll trigger.).

Is there any way to bind Affix to the scrolling of an inner element?

(similar issue: Bootstrap Affix not working inside an Iframe)

Community
  • 1
  • 1

1 Answers1

0

Issue solved, it's just written in the documentation:

https://github.com/twbs/bootstrap/issues/14932

In my case:

<div id="toolbarContainer" data-spy="affix" data-target=".snap-content" data-offset-top="100">
   [...]
</div>