Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

When a page load, the first page is automatically expanded. How can we disable that?

API changes

Data model changes

Comments

Gkomi created an issue. See original summary.

Gkomi’s picture

Title: First is always expanded by default » First tab is always expanded by default
srilakshmier’s picture

I am working on this

srilakshmier’s picture

Hi @Gkomi,

It looks like the functionalities are working as expected, but this is a special requirement. There is no configuration available to make the first tab to be contacted on load. However you can achieve this via jQuery by using the following statements in any of the js file that loads on the desired pages.

jQuery(document).ready(function() {
// To disable the expanded tab
jQuery("#blocktabs-first-1").css({ display: "none" });
jQuery("[aria-controls='blocktabs-first-1']").removeClass("ui-tabs-active ui-state-active");
// Upon click expand the first tab.
jQuery("[aria-controls='blocktabs-first-1']").click(function () {
jQuery("[aria-controls='blocktabs-first-1']").addClass("ui-tabs-active ui-state-active");
jQuery("#blocktabs-first-1").css({ display: "block" });
});
});

Here blocktabs-first-1 is the id of the expanded area for first tab.

Hope this helps.

Thank you

Flow_TnT’s picture

Hi there.
Which js files and pages are you referring to?

Thanks.