Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Created June 6, 2019 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosonweb/386fd2d393d85b0e82131fe18c39d6b6 to your computer and use it in GitHub Desktop.
Save carlosonweb/386fd2d393d85b0e82131fe18c39d6b6 to your computer and use it in GitHub Desktop.
Collapse the All Tab on Beaver Builder Tabs Module When Viewed on Small Screen
jQuery( window ).on('resize', function() {
var $ = jQuery;
if ( $(window).width() <= FLBuilderLayoutConfig.breakpoints.small ){
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-label[data-index=0] i' ).addClass( 'fa-plus' );
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-panel-content[data-index=0] ').hide();
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-label[data-index=0]' ).removeClass( 'fl-tab-active' );
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-panel-content[data-index=0] ').removeClass( 'fl-tab-active' );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment