mirror of
https://github.com/tabler/tabler.git
synced 2026-08-18 00:53:48 +04:00
Open specific tab from hyperlink
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
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 bootstrap.Tab(tab).show();
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
import './autosize';
|
import './autosize';
|
||||||
import './input-mask';
|
import './input-mask';
|
||||||
import './dropdown';
|
import './dropdown';
|
||||||
|
import './tab';
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user