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 228 forks source link

Fixed bug to allow nested uls in tabs #89

Closed richhauck closed 8 years ago

richhauck commented 8 years ago

Found a remote bug where the accordion tab won't collapse if it contains an unordered list. To recreate the bug:

  1. On desktop tabs view, click a tab that contains a nested ul.
  2. Collapse the browser width to mobile.
  3. Attempt to close the open tab.

Resolved by using JQuery first selector on ul.

jellekralt commented 8 years ago

What was the exact configuration you were using when getting this bug? I can't seem to reproduce it :(

richhauck commented 8 years ago

I did a test build using the instructions outlined at http://jellekralt.github.io/Responsive-Tabs to ensure that nothing else in my project was causing a conflict. With your demo example, try this:

  1. At desktop, click tab #3 to expand it.
  2. Collapse the browser to mobile.
  3. Click tab #3 again. It will close the tab.

If you do the above steps with an unordered list in tab #3's contents, it won't collapse.

SuneRadich commented 8 years ago

I had the exact same issue, and was about to do a pull request with the same changes :)

Please merge this in the next version.

jellekralt commented 8 years ago

Thanks for the example, I was able to reproduce it successfully. Thank you for submitting the PR!