mirror of
https://github.com/tabler/tabler.git
synced 2025-12-22 01:44:25 +04:00
17 lines
427 B
JavaScript
17 lines
427 B
JavaScript
import { Tab } from './bootstrap';
|
|
|
|
export const EnableActivationTabsFromLocationHash = () => {
|
|
const locationHash = window.location.hash;
|
|
|
|
if (locationHash) {
|
|
const tabsList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tab"]'));
|
|
const matchedTabs = tabsList.filter(tab => tab.hash === locationHash);
|
|
|
|
matchedTabs.map(tab => {
|
|
new Tab(tab).show();
|
|
});
|
|
}
|
|
}
|
|
|
|
EnableActivationTabsFromLocationHash()
|