Author is Aleš Sýkora
Updated: 15. 11. 2022, Added: 15. 11. 2022
Set Tabs to closed on page load in Oxygen Builder
If you want to bypass the default state of tabs in Oxygen which is - first tab opened by default, then you need to use some jQuery.
- load tabs element to the variable let OxyTabs.
- remove active class from all children elements (tabs)
- add hidden class to the first tab content
jQuery(document).ready(function($) {
let OxyTabs = $('.class-off-your-tabs-element');
OxyTabs.children('.oxy-tab').first().removeClass(myTabs.data('oxy-tabs-active-tab-class'));
OxyTabs.next('.oxy-tabs-contents').children('.oxy-tab-content').first().addClass('oxy-tabs-contents-content-hidden');
});