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

Add option to set a breakpoint to determine when the tabs switch to an accordion #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mknabe
Copy link

@mknabe mknabe commented Jul 10, 2015

Added a breakpoint option to determine when tabs switch to an accordion instead of using CSS classes. The plugin was breaking for me (on the is(':visible') check) when the element was inside of a flexbox element and this was my solution.

Example usage:

$('#myTab').tabCollapse({
  breakpoint: 720
});

This would cause the tabs to be displayed when the screen is greater than or equal to 720px and the accordion when the screen is less than 720px.

@clydebaron2000
Copy link

so you add this to your modified bootstrap?

@mknabe
Copy link
Author

mknabe commented Jul 26, 2016

is(':visible') isn't a very reliable check. This solution would work for everyone

@clydebaron2000
Copy link

oh
and the
$('#myTab').tabCollapse({
breakpoint: pixel#
});
goes in the main js right

@mknabe
Copy link
Author

mknabe commented Jul 26, 2016

Correct

@clydebaron2000
Copy link

is the collapsing element still in a flexbox?

@mknabe
Copy link
Author

mknabe commented Jul 26, 2016

Yes? I'm not exactly sure what you're asking... the element doesn't move

@clydebaron2000
Copy link

are the tab(s) that use .tabCollapse in a flexbox?

@mknabe
Copy link
Author

mknabe commented Jul 26, 2016

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants