Active
Project:
Block Tabs
Version:
8.x-1.0
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2023 at 16:16 UTC
Updated:
8 Mar 2024 at 15:08 UTC
Jump to comment: Most recent
When a page load, the first page is automatically expanded. How can we disable that?
Comments
Comment #2
Gkomi commentedComment #3
srilakshmier commentedI am working on this
Comment #4
srilakshmier commentedHi @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
Comment #5
Flow_TnT commentedHi there.
Which js files and pages are you referring to?
Thanks.