How to use the new affix plugin in twitter's bootstrap 2.1.0?

后端 未结 9 1615
梦谈多话
梦谈多话 2020-11-29 15:17

The bootstrap documentation on that topic is a little confusing to me. I want to achieve similar behaviour like in the docs with the affix navbar: The navbar is below a para

9条回答
  •  天涯浪人
    2020-11-29 15:25

    To fix this very issue I have modified the affix plugin to emit a jQuery event when an object is affixed or unaffixed.

    Here is the pull request: https://github.com/twitter/bootstrap/pull/4712

    And the code: https://github.com/corbinu/bootstrap/blob/master/js/bootstrap-affix.js

    And then do this to attach the navbar:

    
    

提交回复
热议问题