diff --git a/site/content/docs/5.0/components/list-group.md b/site/content/docs/5.0/components/list-group.md index 76d0013e21..c49541bdba 100644 --- a/site/content/docs/5.0/components/list-group.md +++ b/site/content/docs/5.0/components/list-group.md @@ -532,9 +532,11 @@ If no tab was already active, the `hide.bs.tab` and `hidden.bs.tab` events will ```js -var tabEl = document.querySelector('a[data-bs-toggle="list"]') -tabEl.addEventListener('shown.bs.tab', function (event) { - event.target // newly activated tab - event.relatedTarget // previous active tab -}) +var tabElms = document.querySelectorAll('a[data-bs-toggle="list"]') +tabElms.forEach(function(tabElm) { + tabElm.addEventListener('shown.bs.tab', function (event) { + event.target // newly activated tab + event.relatedTarget // previous active tab + }) +} ```