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

Update responsive-tabs.js #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Update responsive-tabs.js #43

wants to merge 4 commits into from

Conversation

mav2287
Copy link

@mav2287 mav2287 commented Nov 3, 2015

By making the following changes you allow the actual tabs themselves to be above(before) or below(after) the panel content. Without this change if the code has the order of

    instead of the more common
      the script will not work. The reason for this is two .next usages that are based on the assumption that it will be written in that order. The correction goes based off the classes and still works with multiple tabs on 1 page. This allows for tabs above, below, left, and right.

By making the following changes you allow the actual tabs themselves to be above(before) or below(after) the panel content. Without this change if the code has the order of <div id="tabcontentbelow" class="tab-content responsive"><ul id="tabnavbelow" class="nav nav-tabs responsive"> instead of the more common <ul id="tabnavbelow" class="nav nav-tabs responsive"><div id="tabcontentbelow" class="tab-content responsive"> the script will not work. The reason for this is two .next usages that are based on the assumption that it will be written in that order. The correction goes based off the classes and still works with multiple tabs on 1 page. This allows for tabs above, below, left, and right.
The changes here will account for using panels inside a tab. Otherwise if the screen is resized the panel will get treated as though it was one of the panels for the tab
@mav2287
Copy link
Author

mav2287 commented Nov 4, 2015

This should now account for tabs out of order and tabs with panels in them. Without this out of order panels won't work and panels in a tab will get messed up when switching back to normal mode.

@mav2287
Copy link
Author

mav2287 commented Nov 4, 2015

Sorry about doing so many commits stupid copy paste didn't work right. The last commit has the patch for allowing for panels within tab content as well as the fix for the tabs below content

@@ -1,3 +1,4 @@

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you remove this extra line break.

@openam
Copy link
Owner

openam commented Jan 2, 2016

Please squash all the commits together, and then rebase.

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