Tuesday, November 15, 2022
The Great Tit
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.

  1. load tabs element to the variable let OxyTabs.
  2. remove active class from all children elements (tabs)
  3. 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');
});
Did I help you? Support me on Patreon!
Beep this article to your friends!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram