Have Tabs / Accordeon closed in responsive mobile

Hi
I am using the Tabs Module and I love the way it flips to accordeon mode in when the size of the site is reduced to around 600px. However, it would be really useful to have the first tab closed at this size.

There must be a jQuery call we can do close this tab. Could you tell me what it is.

Also it would be a great feature request to have this an option in the module.

Thanks

Hey Martin,

Try using the jQuery snippet below and see if it works for you.

jQuery(document).ready(function() {
  var width = jQuery(window).width();
  activetab = jQuery('.fl-tabs').find('.fl-tab-active');
  if (width <= 767) {
    activetab.find('.fa').addClass('fa-plus');
    activetab.removeClass('fl-tab-active');
  }
})

Ben

That’s great! Thank you!

No worries! Enjoy BB! :slight_smile:

Ben