Tweak code example in events part of the docs
This commit is contained in:
parent
f5c8e2f183
commit
c03553df4e
1 changed files with 1 additions and 1 deletions
|
|
@ -657,7 +657,7 @@ If no tab was already active, then the `hide.bs.tab` and `hidden.bs.tab` events
|
|||
</table>
|
||||
|
||||
```js
|
||||
var tabEl = document.querySelector('a[data-bs-toggle="tab"]')
|
||||
var tabEl = document.querySelector('button[data-bs-toggle="tab"]')
|
||||
tabEl.addEventListener('shown.bs.tab', function (event) {
|
||||
event.target // newly activated tab
|
||||
event.relatedTarget // previous active tab
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue