jellekralt / Responsive-Tabs

Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.
http://jellekralt.github.io/Responsive-Tabs/
MIT License
531 stars 227 forks source link

Keep tab connected to the body when resizing screen #36

Closed maragkose closed 9 years ago

maragkose commented 9 years ago

Hi, I have noticed an issue when resizing screen and before reaching the accordion breakpoint: Basically divs are folding (as expected anyway) and if you have 5 tabs and the second is selected then the selected tab appears in the first row "disconnected" from the body. Since I am using your plugin for another project of mine I have added a quick fix to solve this and move the selected tab last so it will always be attached with the tab body. May not be the most elegant solution since I am not a jquery expert but it works :-) If interested I can share my version with you so to add this enhancement in a future version. See the attached screenshot on what I mean if it is not clear from my description --Manos

Original script: original With added fix the tab is moved last so it is attached to the body. It goes back to original position when screen is big enough again. with_fix

jellekralt commented 9 years ago

Hi Manos, I understand the issue you had, and I'm glad you've found a suitable solution that works for you. That being said, I don't think this should be a default feature in this plugin. Thanks for the message though! :)

maragkose commented 9 years ago

Hi, No problem :-)