I would like to load more data after ScrollSpy receives notification. But I don't see how to capture that event and execute a function.
相关问题
- How to add a “active” class to a carousel first el
- Use JS/jQuery to scroll a div's content that h
- Full Clickable Accordion in Bootstrap
- Jscrollpane - Fires a function when isAtBottom
- How to add Bootstrap 4 without Tether?
相关文章
- How to properly initialize an ErrorEvent in javasc
- jQuery attach function to 'load' event of
- Make Bootstrap tab Active on the bases of URL link
- Rails: Twitter Bootstrap Buttons when visited get
- SwiftUI automatically scroll to bottom in ScrollVi
- jQuery accordion: prevent pane from opening/cancel
- Reduce spacing between rows
- How do use bootstrap tooltips with React?
UPDATED This trigger has been pushed into the main build now. You can see it in full docs. http://twitter.github.com/bootstrap/javascript.html#scrollspy
There is an update in the working branch on github that fires an activate callback.
References
Once you grab the activate trigger, you can call it like so:
For bootstrap 3 you can do it like this (docs)
This is for Bootstrap 4 (beta 3):
In general, the usage of the Scrollspy event did not change from Bootstrap 3. As it is stated at the Events section of the Scrollspy documentation, the
activate.bs.scrollspy
event will be fired on the scroll element –the one withdata-spy="scroll"
– whenever a new item becomes activated by the Scrollspy. You can listen to it like that:But!
It is not documented, that when the Scrollspy is used on the
<body>
element, theactivate.bs.scrollspy
event will be available only on thewindow
object.So, in this rather common case, you can catch the Scrollspy event like so: