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

Affixed Sidebar containing accordion div #16356

Closed
Shehab-Eltawel opened this issue Apr 24, 2015 · 4 comments
Closed

Affixed Sidebar containing accordion div #16356

Shehab-Eltawel opened this issue Apr 24, 2015 · 4 comments
Labels

Comments

@Shehab-Eltawel
Copy link

I use Bootstrap 3 Affix for a sidebar containing an accordion. the issue that when I scroll to the bottom and opening an accordion body , it's flow over the footer , but the offset back normal again when I click on the page. Any Ideas to stop the accordion flow over the footer normally without clicking !

@cvrebert cvrebert added the js label Apr 24, 2015
@cvrebert
Copy link
Collaborator

Have you tried something like:

$('#your-affixed-sidebar').on('hidden.bs.collapse shown.bs.collapse', function (e) {
  $('#your-affixed-sidebar').affix('checkPosition');
});

?

@Shehab-Eltawel
Copy link
Author

Yes I did. it could only fix the position of the affixed div without click, but it still overlapping the footer for a second then back normal. !

@cvrebert
Copy link
Collaborator

I'm not sure it's feasible to avoid that split-second overlap.

@hnrch02 @XhmikosR You guys think dealing with this inter-widget interaction is inside or outside of our scope?

@fat
Copy link
Member

fat commented Apr 25, 2015

I think this should be possible with css alone.

If you are correctly setting an affix-bottom class, you should be able to pin the element to the bottom of the page using the bottom css property rather than the top property.

Doing so would make your accordion grow from the bottom, up - which would mean that when the element resized it wouldn't overlap your footer.

Hard to tell though without an actual example. If you want to create a jsbin or something similar we could probably help you out.

Feel free to reopen an issue once you do, thanks!

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

3 participants