From a749db8d0f216491cfefb3849891d93f89b775f7 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 11 Oct 2022 18:45:17 +0000 Subject: composer update twbs --- .../site/content/docs/5.2/components/navs-tabs.md | 71 ++++------------------ 1 file changed, 11 insertions(+), 60 deletions(-) (limited to 'vendor/twbs/bootstrap/site/content/docs/5.2/components/navs-tabs.md') diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/components/navs-tabs.md b/vendor/twbs/bootstrap/site/content/docs/5.2/components/navs-tabs.md index 2b58bdd72..1748dd1bb 100644 --- a/vendor/twbs/bootstrap/site/content/docs/5.2/components/navs-tabs.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.2/components/navs-tabs.md @@ -625,71 +625,22 @@ To make tabs fade in, add `.fade` to each `.tab-pane`. The first tab pane must a {{< partial "callout-danger-async-methods.md" >}} {{< /callout >}} -#### constructor +Activates your content as a tab element. -Activates a tab element and content container. Tab should have either a `data-bs-target` or, if using a link, an `href` attribute, targeting a container node in the DOM. - -```html - - -
-
...
-
...
-
...
-
...
-
- - -``` - -#### show - -Selects the given tab and shows its associated pane. Any other tab that was previously selected becomes unselected and its associated pane is hidden. **Returns to the caller before the tab pane has actually been shown** (i.e. before the `shown.bs.tab` event occurs). +You can create a tab instance with the constructor, for example: ```js -const someTabTriggerEl = document.querySelector('#someTabTrigger') -const tab = new bootstrap.Tab(someTabTriggerEl) - -tab.show() +const bsTab = new bootstrap.Tab('#myTab') ``` -#### dispose - -Destroys an element's tab. - -#### getInstance - -*Static* method which allows you to get the tab instance associated with a DOM element - -```js -const tab = bootstrap.Tab.getInstance('#trigger') // Returns a Bootstrap tab instance -``` - -#### getOrCreateInstance - -*Static* method which allows you to get the tab instance associated with a DOM element, or create a new one in case it wasn't initialized - -```js -const tab = bootstrap.Tab.getOrCreateInstance('#trigger') // Returns a Bootstrap tab instance -``` +{{< bs-table >}} +| Method | Description | +| --- | --- | +| `dispose` | Destroys an element's tab. | +| `getInstance` | Static method which allows you to get the tab instance associated with a DOM element, you can use it like this: `bootstrap.Tab.getInstance(element)`. | +| `getOrCreateInstance` | Static method which returns a tab instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `bootstrap.Tab.getOrCreateInstance(element)`. | +| `show` | Selects the given tab and shows its associated pane. Any other tab that was previously selected becomes unselected and its associated pane is hidden. **Returns to the caller before the tab pane has actually been shown** (i.e. before the `shown.bs.tab` event occurs). | +{{< /bs-table >}} ### Events -- cgit v1.2.3