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

offset-top=0 and offset-bottom=0 don't work on affix plugin via data attributes #12815

Closed
tarot opened this issue Feb 22, 2014 · 0 comments
Closed
Labels
Milestone

Comments

@tarot
Copy link

tarot commented Feb 22, 2014

Via JavaScript, affix plugin can accept {offset:{top:0, bottom:0}} options.

But via data attributes,

<nav data-spy="affix" data-offset-top="0" data-offset-bottom="0">...</nav>

means

<nav data-spy="affix">...</nav>

Probrem in:
https://github.com/twbs/bootstrap/blob/master/js/affix.js#L130-L131

Expected:

      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
      if (data.offsetTop != null)    data.offset.top    = data.offsetTop
@cvrebert cvrebert added the js label Feb 22, 2014
@cvrebert cvrebert added this to the v3.2.0 milestone Feb 22, 2014
@cvrebert cvrebert changed the title offset-top=0 and offset-bottom=0 don't work on affix pugin via data attributes offset-top=0 and offset-bottom=0 don't work on affix plugin via data attributes May 1, 2014
samme pushed a commit to samme/bootstrap that referenced this issue Aug 9, 2014
Don't ignore `data-offset-top=0` `data-offset-bottom=0`
@hnrch02 hnrch02 closed this as completed in e29c750 Sep 8, 2014
Saranya-Raaj pushed a commit to Saranya-Raaj/bootstrap that referenced this issue Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants