Andika itsinda
Amatsinda y'urutonde ni ibintu byoroshye kandi bikomeye byo kwerekana urukurikirane rw'ibirimo. Hindura kandi ubagure kugirango bashyigikire hafi y'ibirimo byose imbere.
Urugero rwibanze
Urutonde rwibanze rwitsinda ni urutonde rudafite urutonde rwibintu hamwe nibyiciro bikwiye. Wubake kuriyo amahitamo akurikira, cyangwa hamwe na CSS yawe nkuko bikenewe.
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ingingo ya kane
- Uwa gatanu
<ul class="list-group">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
Ibintu bifatika
Ongeraho .active
kuri a .list-group-item
kugirango werekane ibikorwa byatoranijwe.
- Ikintu gikora
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ingingo ya kane
- Uwa gatanu
<ul class="list-group">
<li class="list-group-item active" aria-current="true">An active item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
Ibintu byahagaritswe
Ongeraho .disabled
kuri a .list-group-item
kugirango bigaragare ko byahagaritswe. Menya ko ibintu bimwe na bimwe .disabled
bizakenera JavaScript yihariye kugirango ihagarike byimazeyo ibyabaye (urugero, amahuza).
- Ikintu cyahagaritswe
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ingingo ya kane
- Uwa gatanu
<ul class="list-group">
<li class="list-group-item disabled" aria-disabled="true">A disabled item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
Ihuza na buto
Koresha <a>
s cyangwa <button>
s kugirango ukore urutonde rwibikorwa byitsinda ryibintu hamwe na hover, byahagaritswe, hamwe na leta ikora wongeyeho .list-group-item-action
. Dutandukanya aya masomo ya pseudo kugirango tumenye amatsinda yakozwe kurutonde rwibintu bidakorana (nka <li>
s cyangwa <div>
s) bidatanga gukanda cyangwa gukanda.
Witondere kudakoresha .btn
amasomo asanzwe hano .
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active" aria-current="true">
The current link item
</a>
<a href="#" class="list-group-item list-group-item-action">A second link item</a>
<a href="#" class="list-group-item list-group-item-action">A third link item</a>
<a href="#" class="list-group-item list-group-item-action">A fourth link item</a>
<a href="#" class="list-group-item list-group-item-action disabled" tabindex="-1" aria-disabled="true">A disabled link item</a>
</div>
Hamwe na <button>
s, urashobora kandi gukoresha disabled
ikiranga aho kuba .disabled
icyiciro. Birababaje, <a>
ntabwo ushyigikiye ikiranga.
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action active" aria-current="true">
The current button
</button>
<button type="button" class="list-group-item list-group-item-action">A second item</button>
<button type="button" class="list-group-item list-group-item-action">A third button item</button>
<button type="button" class="list-group-item list-group-item-action">A fourth button item</button>
<button type="button" class="list-group-item list-group-item-action" disabled>A disabled button item</button>
</div>
Fasha
Ongeraho .list-group-flush
kugirango ukureho imipaka hamwe nu mfuruka zizengurutse kugirango utange urutonde rwibintu byitsinda kugeza ku kintu cyababyeyi (urugero, amakarita).
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ingingo ya kane
- Uwa gatanu
<ul class="list-group list-group-flush">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
Numero
Ongeramo .list-group-numbered
icyiciro cyo guhindura (kandi uhitemo gukoresha ikintu <ol>
) kugirango uhitemo urutonde rwumubare wibintu. Imibare ikorwa binyuze kuri CSS (bitandukanye na <ol>
sisitemu isanzwe ya mushakisha) kugirango ishyirwe neza imbere yurutonde rwibintu no kwemerera neza.
Imibare ikorwa na counter-reset
kuri <ol>
, hanyuma ikandikwa igashyirwa hamwe na ::before
pseudo-element kuri <li>
hamwe counter-increment
na content
.
- Cras justo odio
- Cras justo odio
- Cras justo odio
<ol class="list-group list-group-numbered">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Cras justo odio</li>
</ol>
Ibi bikora cyane hamwe nibirimo bisanzwe.
-
UmutweCras justo odio
-
UmutweCras justo odio
-
UmutweCras justo odio
<ol class="list-group list-group-numbered">
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">Subheading</div>
Cras justo odio
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">Subheading</div>
Cras justo odio
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">Subheading</div>
Cras justo odio
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
</ol>
Uhagaritse
Ongeraho .list-group-horizontal
kugirango uhindure imiterere yurutonde rwibintu kuva kuri vertical to horizontal kurwego rwose. Ubundi, hitamo impinduka zishubije .list-group-horizontal-{sm|md|lg|xl|xxl}
kugirango ukore urutonde itsinda ritambitse guhera kuri iyo ngingo min-width
. Kugeza ubu urutonde rutambitse ntirushobora guhuzwa hamwe na flush urutonde rwamatsinda.
ProTip: Urashaka ubugari buringaniye urutonde rwibintu mugihe utambitse? Ongeraho .flex-fill
kuri buri rutonde rw'itsinda.
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
- Ikintu
- Ikintu cya kabiri
- Ikintu cya gatatu
<ul class="list-group list-group-horizontal">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-sm">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-md">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-lg">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-xl">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
<ul class="list-group list-group-horizontal-xxl">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
Amasomo ajyanye
Koresha amasomo ajyanye nuburyo bwo gutondekanya urutonde hamwe na leta hamwe nibara.
- Urutonde rworoheje urutonde rwitsinda
- Urutonde rwibanze urutonde rwibintu
- Urutonde rworoheje rwa kabiri urutonde rwitsinda
- Intsinzi yoroshye kurutonde rwitsinda
- Urutonde rworoshye urutonde rwibintu
- Urutonde rworoshye rwo kuburira urutonde rwitsinda
- Ibisobanuro byoroshye urutonde rwitsinda
- Urutonde rworoheje urutonde rwibintu
- Urutonde rworoshye rwurutonde rwitsinda
<ul class="list-group">
<li class="list-group-item">A simple default list group item</li>
<li class="list-group-item list-group-item-primary">A simple primary list group item</li>
<li class="list-group-item list-group-item-secondary">A simple secondary list group item</li>
<li class="list-group-item list-group-item-success">A simple success list group item</li>
<li class="list-group-item list-group-item-danger">A simple danger list group item</li>
<li class="list-group-item list-group-item-warning">A simple warning list group item</li>
<li class="list-group-item list-group-item-info">A simple info list group item</li>
<li class="list-group-item list-group-item-light">A simple light list group item</li>
<li class="list-group-item list-group-item-dark">A simple dark list group item</li>
</ul>
Amasomo ajyanye nayo akorana nayo .list-group-item-action
. Reba inyongera yuburyo bwa hover hano ntabwo igaragara murugero rwabanje. Inkunga nayo ni .active
leta; shyira mu bikorwa kugirango ugaragaze ihitamo rikorwa kurutonde rwibintu.
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action">A simple default list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-primary">A simple primary list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-secondary">A simple secondary list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-success">A simple success list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-danger">A simple danger list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-warning">A simple warning list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-info">A simple info list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-light">A simple light list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-dark">A simple dark list group item</a>
</div>
Gutanga ibisobanuro kubuhanga bufasha
Gukoresha ibara kugirango wongere ibisobanuro bitanga gusa icyerekezo cyerekana, kitazashyikirizwa abakoresha tekinoroji ifasha - nk'abasoma ecran. Menya neza ko amakuru yerekanwe n'ibara agaragara uhereye kubirimo ubwabyo (urugero: inyandiko igaragara), cyangwa bigashyirwa muburyo butandukanye, nk'inyandiko y'inyongera ihishe hamwe .visually-hidden
n'ishuri.
N'ibirango
Ongeraho badge kurutonde urwo arirwo rwose kugirango werekane ibara ridasomwe, ibikorwa, nibindi byinshi bifashishije ibikorwa bimwe na bimwe byingirakamaro .
- Urutonde14
- Ikintu cya kabiri cyurutonde2
- Ikintu cya gatatu cyurutonde1
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
A list item
<span class="badge bg-primary rounded-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
A second list item
<span class="badge bg-primary rounded-pill">2</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
A third list item
<span class="badge bg-primary rounded-pill">1</span>
</li>
</ul>
Ibirimo
Ongeraho hafi HTML iyo ari yo yose imbere, ndetse no kumurwi uhuza urutonde nkurwo hepfo, hamwe nubufasha bwa flexbox .
Andika itsinda ryumutwe
Iminsi 3 ishizeBimwe mubibanza biri mu gika.
Kandi icapiro rito.Andika itsinda ryumutwe
Iminsi 3 ishizeBimwe mubibanza biri mu gika.
Kandi bamwe bacecekesheje icapiro rito.Andika itsinda ryumutwe
Iminsi 3 ishizeBimwe mubibanza biri mu gika.
Kandi bamwe bacecekesheje icapiro rito.<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active" aria-current="true">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small>3 days ago</small>
</div>
<p class="mb-1">Some placeholder content in a paragraph.</p>
<small>And some small print.</small>
</a>
<a href="#" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small class="text-muted">3 days ago</small>
</div>
<p class="mb-1">Some placeholder content in a paragraph.</p>
<small class="text-muted">And some muted small print.</small>
</a>
<a href="#" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small class="text-muted">3 days ago</small>
</div>
<p class="mb-1">Some placeholder content in a paragraph.</p>
<small class="text-muted">And some muted small print.</small>
</a>
</div>
Agasanduku na radiyo
Shira agasanduku ka Bootstrap na radio mumurongo wibintu hanyuma uhindure ibikenewe. Urashobora kubikoresha nta <label>
s, ariko nyamuneka wibuke gushyiramo aria-label
ikiranga nagaciro kubigerwaho.
- Agasanduku ka mbere
- Agasanduku ka kabiri
- Agasanduku ka gatatu
- Agasanduku ka kane
- Agasanduku ka gatanu
<ul class="list-group">
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
First checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Second checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Third checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Fourth checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Fifth checkbox
</li>
</ul>
Niba kandi ushaka <label>
s nkibice .list-group-item
binini byibasiwe, urashobora kubikora, nabyo.
<div class="list-group">
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
First checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Second checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Third checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Fourth checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Fifth checkbox
</label>
</div>
Sass
Ibihinduka
$list-group-color: $gray-900;
$list-group-bg: $white;
$list-group-border-color: rgba($black, .125);
$list-group-border-width: $border-width;
$list-group-border-radius: $border-radius;
$list-group-item-padding-y: $spacer * .5;
$list-group-item-padding-x: $spacer;
$list-group-item-bg-scale: -80%;
$list-group-item-color-scale: 40%;
$list-group-hover-bg: $gray-100;
$list-group-active-color: $component-active-color;
$list-group-active-bg: $component-active-bg;
$list-group-active-border-color: $list-group-active-bg;
$list-group-disabled-color: $gray-600;
$list-group-disabled-bg: $list-group-bg;
$list-group-action-color: $gray-700;
$list-group-action-hover-color: $list-group-action-color;
$list-group-action-active-color: $body-color;
$list-group-action-active-bg: $gray-200;
Imvange
Byakoreshejwe muburyo $theme-colors
bwo kubyara ibyiciro bitandukanye bya .list-group-item
s.
@mixin list-group-item-variant($state, $background, $color) {
.list-group-item-#{$state} {
color: $color;
background-color: $background;
&.list-group-item-action {
&:hover,
&:focus {
color: $color;
background-color: shade-color($background, 10%);
}
&.active {
color: $white;
background-color: $color;
border-color: $color;
}
}
}
}
Umuzingi
Umuzingo utanga ibyiciro byo guhindura hamwe na list-group-item-variant()
mixin.
// List group contextual variants
//
// Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states.
@each $state, $value in $theme-colors {
$list-group-variant-bg: shift-color($value, $list-group-item-bg-scale);
$list-group-variant-color: shift-color($value, $list-group-item-color-scale);
@if (contrast-ratio($list-group-variant-bg, $list-group-variant-color) < $min-contrast-ratio) {
$list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-item-color-scale));
}
@include list-group-item-variant($state, $list-group-variant-bg, $list-group-variant-color);
}
Imyitwarire ya JavaScript
Koresha tab JavaScript plugin-shyiramo kugiti cyawe cyangwa unyuze muri bootstrap.js
dosiye yakusanyijwe - kugirango wongere itsinda ryurutonde kugirango ukore imbonerahamwe yibirimo yibirimo.
<div class="row">
<div class="col-4">
<div class="list-group" id="list-tab" role="tablist">
<a class="list-group-item list-group-item-action active" id="list-home-list" data-bs-toggle="list" href="#list-home" role="tab" aria-controls="list-home">Home</a>
<a class="list-group-item list-group-item-action" id="list-profile-list" data-bs-toggle="list" href="#list-profile" role="tab" aria-controls="list-profile">Profile</a>
<a class="list-group-item list-group-item-action" id="list-messages-list" data-bs-toggle="list" href="#list-messages" role="tab" aria-controls="list-messages">Messages</a>
<a class="list-group-item list-group-item-action" id="list-settings-list" data-bs-toggle="list" href="#list-settings" role="tab" aria-controls="list-settings">Settings</a>
</div>
</div>
<div class="col-8">
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="list-home" role="tabpanel" aria-labelledby="list-home-list">...</div>
<div class="tab-pane fade" id="list-profile" role="tabpanel" aria-labelledby="list-profile-list">...</div>
<div class="tab-pane fade" id="list-messages" role="tabpanel" aria-labelledby="list-messages-list">...</div>
<div class="tab-pane fade" id="list-settings" role="tabpanel" aria-labelledby="list-settings-list">...</div>
</div>
</div>
</div>
Koresha ibiranga amakuru
Urashobora gukora urutonde rwitsinda ryanditse utanditse JavaScript iyariyo yose data-bs-toggle="list"
cyangwa kubintu. Koresha aya makuru ibiranga kuri .list-group-item
.
<div role="tabpanel">
<!-- List group -->
<div class="list-group" id="myList" role="tablist">
<a class="list-group-item list-group-item-action active" data-bs-toggle="list" href="#home" role="tab">Home</a>
<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#profile" role="tab">Profile</a>
<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#messages" role="tab">Messages</a>
<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#settings" role="tab">Settings</a>
</div>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="home" role="tabpanel">...</div>
<div class="tab-pane" id="profile" role="tabpanel">...</div>
<div class="tab-pane" id="messages" role="tabpanel">...</div>
<div class="tab-pane" id="settings" role="tabpanel">...</div>
</div>
</div>
Binyuze kuri JavaScript
Gushoboza urutonde rwibintu ukoresheje JavaScript (buri kintu cyurutonde kigomba gukoreshwa kugiti cye):
var triggerTabList = [].slice.call(document.querySelectorAll('#myTab a'))
triggerTabList.forEach(function (triggerEl) {
var tabTrigger = new bootstrap.Tab(triggerEl)
triggerEl.addEventListener('click', function (event) {
event.preventDefault()
tabTrigger.show()
})
})
Urashobora gukora urutonde rwumuntu muburyo butandukanye:
var triggerEl = document.querySelector('#myTab a[href="#profile"]')
bootstrap.Tab.getInstance(triggerEl).show() // Select tab by name
var triggerFirstTabEl = document.querySelector('#myTab li:first-child a')
bootstrap.Tab.getInstance(triggerFirstTabEl).show() // Select first tab
Ingaruka zashize
Kugirango utume pansiyo ishire, ongera .fade
kuri buri .tab-pane
. Urupapuro rwa mbere rwa pane rugomba kandi .show
gukora ibintu byambere bigaragara.
<div class="tab-content">
<div class="tab-pane fade show active" id="home" role="tabpanel">...</div>
<div class="tab-pane fade" id="profile" role="tabpanel">...</div>
<div class="tab-pane fade" id="messages" role="tabpanel">...</div>
<div class="tab-pane fade" id="settings" role="tabpanel">...</div>
</div>
Uburyo
constructor
Gukora urutonde rwibintu nibintu birimo. Tab igomba kuba ifite a data-bs-target
cyangwa href
igamije icyerekezo cya kontineri muri DOM.
<div class="list-group" id="myList" role="tablist">
<a class="list-group-item list-group-item-action active" data-bs-toggle="list" href="#home" role="tab">Home</a>
<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#profile" role="tab">Profile</a>
<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#messages" role="tab">Messages</a>
<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#settings" role="tab">Settings</a>
</div>
<div class="tab-content">
<div class="tab-pane active" id="home" role="tabpanel">...</div>
<div class="tab-pane" id="profile" role="tabpanel">...</div>
<div class="tab-pane" id="messages" role="tabpanel">...</div>
<div class="tab-pane" id="settings" role="tabpanel">...</div>
</div>
<script>
var firstTabEl = document.querySelector('#myTab a:last-child')
var firstTab = new bootstrap.Tab(firstTabEl)
firstTab.show()
</script>
show
Hitamo urutonde rwatanzwe kandi rwerekane pane. Ibindi bintu byose byurutonde byari byatoranijwe mbere biba bitatoranijwe kandi pane bifitanye isano irahishe. Garuka kumuhamagara mbere yuko tab pane yerekanwe mubyukuri (urugero, mbere yuko shown.bs.tab
ibyabaye bibaho).
var someListItemEl = document.querySelector('#someListItem')
var tab = new bootstrap.Tab(someListItemEl)
tab.show()
dispose
Gusenya ikintu cyibintu.
getInstance
Uburyo buhamye bugufasha kubona urugero rwa tab rujyanye nibintu bya DOM
var triggerEl = document.querySelector('#trigger')
var tab = bootstrap.Tab.getInstance(triggerEl) // Returns a Bootstrap tab instance
getOrCreateInstance
Uburyo buhamye bugufasha kubona urugero rwa tab rujyanye nibintu bya DOM, cyangwa gukora bundi bushya mugihe bitatangijwe
var triggerEl = document.querySelector('#trigger')
var tab = bootstrap.Tab.getOrCreateInstance(triggerEl) // Returns a Bootstrap tab instance
Ibyabaye
Iyo werekanye tab nshya, ibyabaye birashya muburyo bukurikira:
hide.bs.tab
(kuri tab ikora)show.bs.tab
(kuri to-kwerekanwa tab)hidden.bs.tab
(kurupapuro rwibanze rukora, kimwehide.bs.tab
nkicyabaye)shown.bs.tab
(ku gishya-gikora gusa-cyerekanwe tab, kimwe kimweshow.bs.tab
nicyabaye)
Niba nta tab yari isanzwe ikora, hide.bs.tab
ibyabaye hidden.bs.tab
ntibizasezererwa.
Ubwoko bwibyabaye | Ibisobanuro |
---|---|
show.bs.tab |
Ibirori birasa kuri tab yerekana, ariko mbere yuko tab nshya yerekanwe. Koresha event.target no event.relatedTarget gutondekanya tab ikora hamwe na tab yabanjirije gukora (niba ihari). |
shown.bs.tab |
Ibirori birasa kuri tab yerekanwe nyuma ya tab yerekanwe. Koresha event.target no event.relatedTarget gutondekanya tab ikora hamwe na tab yabanjirije gukora (niba ihari). |
hide.bs.tab |
Ibirori birasa iyo tab nshya igomba kwerekanwa (nuko rero tab ikora ibanza igomba guhishwa). Koresha event.target no event.relatedTarget guhitamo icyerekezo gikora hamwe nigishya vuba-kugirango-ukore-tab, kimwe. |
hidden.bs.tab |
Ibirori birashya nyuma yerekana tab nshya yerekanwe (nuko rero tab yabanjirije gukora irahishe). Koresha event.target kandi event.relatedTarget ugamije kubanza gukora tab hamwe na tab nshya ikora, kimwe. |
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
})
}