Closed timkelty closed 8 years ago
I achieved what I was looking for by calling .active
on the instance instead of using opts.active
:
$tabGroup.data('responsivetabs').activate(activeTabIndex);
Are you sure you haven't also set startCollapsed: 'accordion',
? I've tested it (without that option) and it seems to work fine
Right you are!
Since i was conditionally setting the active
, I guess I was expecting this setting this to override the startCollapsed
setting.
In my conditional I am now setting active
as well as startCollapsed
and it works as I was expecting.
Thanks!
The options seem to be a bit conflicting indeed, I might look into clarifying this more in the future. Glad that its working for you though!
If
opts.active
is set and the initial state is accordion, no accordion is opened.Seems to work when loading in a tabs state.