bootstrap 2.3.2 affix bottom jumps between affix a

2019-07-17 06:53发布

I'm using twitter bootstrap 2.3.2 and included the affix js. The div perfectly listens to the top:500px; but has difficulties with the bottom, on reaching bottom, it switches the div name between affix and affix-bottom every pixel. Looking nineties flashy, which is nice in a way.., but not really how I would expect it. Any ideas on how to stick the bottom on the way it should be? Would make my day!!

The js:

$(".my-affix-div").affix({
  offset: {
    top: 440,
    bottom: 270
}

And the css:

.affix{
    top:60px;
}

.affix-bottom {
    bottom:270px;
    position: absolute;
    top:auto;
}

1条回答
男人必须洒脱
2楼-- · 2019-07-17 07:28
  1. Download bootstrap 3.3.7 version.

  2. find affix.js in Js folder, add it to Ur project in script tag.

I solved my problem by this...if this helpful let me know. Thanks

查看更多
登录 后发表回答