/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
core/js/src/tab.ts
18 строк
579 B
Paweł Kuna
Generate SCSS and JS docs snippets from source markers (#2798)
05 авг 2026, 19:44
Не верифицирован
05 авг 2026, 19:44
9c4dc73
Код
Авторство
О чём код?
import { Tab } from './bootstrap' // js-docs-start tab-init export const EnableActivationTabsFromLocationHash = (): void => { const locationHash: string = window.location.hash if (locationHash) { const tabsList: HTMLAnchorElement[] = [].slice.call(document.querySelectorAll<HTMLAnchorElement>('[data-bs-toggle="tab"]')) const matchedTabs = tabsList.filter((tab: HTMLAnchorElement) => tab.hash === locationHash) matchedTabs.map((tab: HTMLAnchorElement) => { new Tab(tab).show() }) } } EnableActivationTabsFromLocationHash() // js-docs-end tab-init