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

State change not triggering (was"collapsible: 'accordion' not working") #98

Closed wonkeythemonkey closed 8 years ago

wonkeythemonkey commented 8 years ago

Solved I was calling this with a class instead of an ID. Because of that, the state check was looking at an array of objects (albeit an array of 1) instead of the object itself. When I switched to using an ID, the problem was fixed.

Original issue Not sure what about my setup could be causing this. All of the "collapsible" settings are working as expected except for "accordion."

It seems like the internal state of the parent element is not being set to "accordion" when the accordion display state is active. That would explain why the accordion will collapse correctly when collapsible is set to "true" but not when it is set to "accordion."

I might be able to troubleshoot this myself, but I'm not quite JavaScript savvy enough to figure out how to query the current state and see if it's correct.

UPDATE: I added a function to the activateState trigger, and it appears that the state is not changing as I resize the window.