Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Affix triggering on scrolling of a div element #14932

Closed
CoachGodzup opened this issue Oct 30, 2014 · 1 comment
Closed

Affix triggering on scrolling of a div element #14932

CoachGodzup opened this issue Oct 30, 2014 · 1 comment
Labels

Comments

@CoachGodzup
Copy link

Hi,

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 (instead of the whole window)?

@hnrch02 hnrch02 added the js label Oct 30, 2014
@hnrch02
Copy link
Collaborator

hnrch02 commented Oct 30, 2014

Yes, use the target option, as documented here: http://getbootstrap.com/javascript/#affix-usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants