Tweak code example in events part of the docs

This commit is contained in:
Patrick H. Lauke 2021-01-05 23:41:42 +00:00
parent f5c8e2f183
commit c03553df4e

View file

@ -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