b(nestedTabName, parentContainer); // Dynamically find the parent container
                }, 200); // Delay to ensure parent tab content is visible
            }
        } else {
            // Default to the first tab if no tab is specified
            var firstTabName = $('.nav-tabs .nav-link').first().attr('data-tab-name');
            activaTab(firstTabName);
        }
    }

    function clearPreviousAnchor() {
        var url = new URL(window.location.href);
        url.hash = ''; // Clear the hash 