Tilmaamaha Qalabka
Dukumeenti iyo tusaaleyaal lagu daro qalabka Bootstrap ee caadiga ah ee CSS iyo JavaScript iyadoo la adeegsanayo CSS3 animations iyo xogta-bs-sifada kaydinta cinwaanka maxalliga ah.
Dulmar
Waxyaabaha ay tahay in la ogaado marka la isticmaalayo Tooltip plugin:
- Tilmaamaha qalabku waxay ku tiirsan yihiin qaybta saddexaad ee maktabadda Popper si loo meeleeyo. Waa inaad ku darto popper.min.js ka hor
bootstrap.js
, ama isticmaal mid kabootstrap.bundle.min.js
kooban Popper. - Tilmaamaha aaladaha ayaa loo gatay sababo waxqabad dartood, marka waa inaad adigu bilowdaa .
- Tilmaamaha qalabka leh cinwaanno eber ah weligood lama soo bandhigin.
- Qeex
container: 'body'
si aad uga fogaato soo jeedinta dhibaatooyinka qaybo badan oo kakan (sida kooxahayada wax gelinta, kooxaha badhanka, iwm). - Qalab kicinta walxaha qarsoon ma shaqayn doonaan.
- Tilmaamaha aaladaha
.disabled
amadisabled
walxaha waa in lagu kiciyaa curiyaha duubka ah. - Marka laga soo kiciyo hyperlinks kuwaas oo fidsan xariiqyo badan, tabaha aaladaha ayaa dhexda u ahaan doona. Isticmaal s si
white-space: nowrap;
aad<a>
uga fogaato dhaqankan. - Tilmaamaha qalabka waa in la qariyaa ka hor inta aan laga saarin walxaha u dhigma ee DOM.
- Tilmaamaha aaladaha waa la kicin karaa iyada oo ay ugu wacan tahay shay ku jira hadhka DOM.
Waxaas oo dhan ma helay? Way fiicantahay, aan aragno sida ay ula shaqeeyaan tusaalooyinka qaar.
prefers-reduced-motion
waydiinta warbaahinta. Eeg
qaybta dhaqdhaqaaqa la dhimay ee dukumeenti gelitaankeena .
Tusaalooyinka
Daar tabaha aaladaha
Sida kor ku xusan, waa in aad bilawdo qalabyada ka hor inta aan la isticmaalin. Hal dariiqo oo lagu bilaabi karo dhammaan aaladaha bogga ayaa ah in lagu xusho data-bs-toggle
sifadooda, sida:
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
Tilmaamaha ku saabsan isku xirka
Ka dul rog xiriirka hoose si aad u aragto qalabyada:
Qoraalka meeleeyaha si aad u muujiso qaar ka mid ah xidhiidhada khadka ee leh qalabyada Kani hadda waa uun wax-buuxiyaha, ma jiro dilaa. Nuxurka halkan loo dhigay si loogu ekaysiiyo joogitaanka qoraalka dhabta ah . Oo waxaas oo dhan si ay fikrad kuu siiyaan sida qalabku u ekaan lahaa marka loo isticmaalo xaaladaha dhabta ah ee aduunka. Markaa waxaan rajaynaynaa inaad hadda aragtay sida qalabkan xidhiidhiyayaashu ugu shaqayn karaan si dhab ah, marka aad ku isticmaasho goobtaada ama mashruucaaga.
<p class="muted">Placeholder text to demonstrate some <a href="#" data-bs-toggle="tooltip" data-bs-title="Default tooltip">inline links</a> with tooltips. This is now just filler, no killer. Content placed here just to mimic the presence of <a href="#" data-bs-toggle="tooltip" data-bs-title="Another tooltip">real text</a>. And all that just to give you an idea of how tooltips would look when used in real-world situations. So hopefully you've now seen how <a href="#" data-bs-toggle="tooltip" data-bs-title="Another one here too">these tooltips on links</a> can work in practice, once you use them on <a href="#" data-bs-toggle="tooltip" data-bs-title="The last tip!">your own</a> site or project.
</p>
title
ama
midkood. data-bs-title
Marka
title
la isticmaalo, Popper wuxuu si toos ah ugu beddeli doonaa
data-bs-title
marka curiyaha la sameeyo.
Aaladaha gaarka ah
Lagu daray v5.2.0Waxaad ku habeyn kartaa muuqaalka aaladaha aaladaha adoo isticmaalaya doorsoomayaasha CSS . Waxaan dejinay fasal gaar ah data-bs-custom-class="custom-tooltip"
si aan u cabbirno muuqaalkayaga caadada ah oo aan u isticmaalno si aan uga gudubno doorsoomaha CSS-ga maxalliga ah.
.custom-tooltip {
--bs-tooltip-bg: var(--bs-primary);
}
<button type="button" class="btn btn-secondary"
data-bs-toggle="tooltip" data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="This top tooltip is themed via CSS variables.">
Custom tooltip
</button>
Tilmaamaha
Dul bood badhamada hoose si aad u aragto afarta tilmaamood ee tilmaamaha: sare, midig, hoose, iyo bidix. Tilmaamaha waa la milicsadaa marka la isticmaalayo Bootstrap gudaha RTL.
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Tooltip on top">
Tooltip on top
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" data-bs-title="Tooltip on right">
Tooltip on right
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Tooltip on bottom">
Tooltip on bottom
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="Tooltip on left">
Tooltip on left
</button>
Iyo HTML caadadii lagu daray:
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" data-bs-title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">
Tooltip with HTML
</button>
Sida SVG:
CSS
Kala duwanaansho
Lagu daray v5.2.0Iyada oo qayb ka ah habka doorsoomayaasha CSS ee Bootstrap, aaladaha hadda waxay isticmaalaan doorsoomayaasha CSS-ga maxalliga ah .tooltip
si loo horumariyo habaynta waqtiga-dhabta ah. Qiimaha doorsoomayaasha CSS waxa lagu dejiyay Sass, sidaa darteed habaynta Sass wali waa la taageerayaa, sidoo kale.
--#{$prefix}tooltip-zindex: #{$zindex-tooltip};
--#{$prefix}tooltip-max-width: #{$tooltip-max-width};
--#{$prefix}tooltip-padding-x: #{$tooltip-padding-x};
--#{$prefix}tooltip-padding-y: #{$tooltip-padding-y};
--#{$prefix}tooltip-margin: #{$tooltip-margin};
@include rfs($tooltip-font-size, --#{$prefix}tooltip-font-size);
--#{$prefix}tooltip-color: #{$tooltip-color};
--#{$prefix}tooltip-bg: #{$tooltip-bg};
--#{$prefix}tooltip-border-radius: #{$tooltip-border-radius};
--#{$prefix}tooltip-opacity: #{$tooltip-opacity};
--#{$prefix}tooltip-arrow-width: #{$tooltip-arrow-width};
--#{$prefix}tooltip-arrow-height: #{$tooltip-arrow-height};
Doorsoomayaasha Sass
$tooltip-font-size: $font-size-sm;
$tooltip-max-width: 200px;
$tooltip-color: $white;
$tooltip-bg: $black;
$tooltip-border-radius: $border-radius;
$tooltip-opacity: .9;
$tooltip-padding-y: $spacer * .25;
$tooltip-padding-x: $spacer * .5;
$tooltip-margin: null; // TODO: remove this in v6
$tooltip-arrow-width: .8rem;
$tooltip-arrow-height: .4rem;
// fusv-disable
$tooltip-arrow-color: null; // Deprecated in Bootstrap 5.2.0 for CSS variables
// fusv-enable
Isticmaalka
Plugin-ka Tooltip wuxuu soo saaraa nuxur iyo calaamadayn baahida, iyo sida caadiga ah wuxuu meeleeyaa tilmaamo qalab ka dib cunsurkooda kiciya.
Ku kiciya tilmaanta aalada JavaScript:
const exampleEl = document.getElementById('example')
const tooltip = new bootstrap.Tooltip(exampleEl, options)
Qulqulka auto
iyoscroll
Booska qalabku wuxuu isku dayaa inuu si toos ah u bedelo marka weelka waalidku haysto overflow: auto
ama overflow: scroll
jecel yahay .table-responsive
, laakiin wali wuxuu hayaa meelaynta asalka ah. Si aad tan u xalliso, u deji boundary
ikhtiyaarka (loogu talagalay beddelaha beddelka adoo isticmaalaya popperConfig
ikhtiyaarka) HTMLElement kasta si aad uga gudubto qiimaha caadiga ah, 'clippingParents'
sida document.body
:
const tooltip = new bootstrap.Tooltip('#example', {
boundary: document.body // or document.querySelector('#boundary')
})
Calaamadayn
Calaamadeynta loo baahan yahay ee qalab-tireedku waa data
sifo kaliya oo title
qaybta HTML ee aad rabto inaad haysato qalab. Astaanta la soo saaray ee tilmaanta qalabku waa mid fudud, in kasta oo ay u baahan tahay boos (sida caadiga ah, oo loo dejiyay top
plugin).
Samaynta qalabyada u shaqeeya kiiboodhka iyo isticmaalayaasha tignoolajiyada caawiya
Waa inaad ku darto oo kaliya qalabyada curiyayaasha HTML kuwaas oo dhaqan ahaan kiiboodhka diirada saaraya iyo is dhexgal (sida isku xidhka ama kontaroolada foomka). In kasta oo walxaha HTML ee gardarrada ah (sida <span>
s) laga dhigi karo mid diiradda lagu saari karo iyada oo lagu darayo sifada tabindex="0"
, tani waxay ku dari doontaa joogsiga laga yaabo inay ka cadhaysiiyaan iyo jahawareer on walxaha aan is dhex galka lahayn ee isticmaaleyaasha kiiboodhka, iyo tignoolajiyada caawinta badankoodu hadda kuma dhawaaqaan aaladda xaaladdan. Intaa waxaa dheer, ha isku hallayn oo kaliya hover
inay tahay kiciye aaladdaada, maxaa yeelay tani waxay ka dhigaysaa aaladahaaga mid aan macquul ahayn inay kiciyaan isticmaaleyaasha kiiboodhka.
<!-- HTML to write -->
<a href="#" data-bs-toggle="tooltip" data-bs-title="Some tooltip text!">Hover over me</a>
<!-- Generated markup by the plugin -->
<div class="tooltip bs-tooltip-top" role="tooltip">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
Some tooltip text!
</div>
</div>
Curiyayaasha naafada
Qaybaha sifada leh disabled
ma aha kuwo is dhexgal ah, taasoo la micno ah in isticmaalayaashu aanay diiradda saari karin, kor u qaadi karin, ama aanay gujin karin si ay u kiciyaan qalab (ama popover). Xakameyn ahaan, waxaad u baahan doontaa inaad ka kiciso qalabka wax lagu duubo <div>
ama <span>
, sida habboon loo sameeyay kiiboodhka diiradda saaraya iyadoo la isticmaalayo tabindex="0"
.
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" data-bs-title="Disabled tooltip">
<button class="btn btn-primary" type="button" disabled>Disabled button</button>
</span>
Ikhtiyaarada
Sida xulashooyinka loogu gudbi karo sifooyinka xogta ama JavaScript, waxaad ku dari kartaa magaca ikhtiyaarka ah data-bs-
, sida ku jira data-bs-animation="{value}"
. Hubi inaad ka beddesho nooca kiis ee magaca ikhtiyaarka " camelCase " una beddelo " kebab-case " markaad ikhtiyaarka ku gudbinayso sifooyinka xogta. Tusaale ahaan, isticmaal data-bs-custom-class="beautifier"
bedelkii data-bs-customClass="beautifier"
.
Marka la eego Bootstrap 5.2.0, dhammaan qaybaha waxay taageeraan sifada xogta kaydsan ee tijaabadadata-bs-config
ah taas oo u dejin karta qaabaynta qaybaha fudud sida xadhig JSON ah. Marka curiye leeyahay data-bs-config='{"delay":0, "title":123}'
iyo data-bs-title="456"
sifooyin, title
qiimaha kama dambaysta ahi waxa uu ahaan doonaa 456
sifada xogta goonida ahina waxa ay meesha ka saari doontaa qiyamka lagu bixiyo data-bs-config
. Intaa waxaa dheer, sifada xogta hadda jirta waxay awood u leedahay inay ku noolaato qiyamka JSON sida data-bs-delay='{"show":0,"hide":150}'
.
sanitize
,
sanitizeFn
, iyo
allowList
ikhtiyaarrada aan lagu bixin karin iyadoo la adeegsanayo sifooyinka xogta.
Magaca | Nooca | Asal ahaan | Sharaxaada |
---|---|---|---|
allowList |
walax | Qiimaha caadiga ah | Shayga oo ka kooban sifooyin iyo calaamado la oggol yahay. |
animation |
booliyan | true |
Codso u gudbida libdhicida CSS ilaa aaladda. |
boundary |
xadhig, element | 'clippingParents' |
Xadka xad-dhaafka ah ee xaddidaadda qalabka (waxay khusaysaa kaliya Popper ka-hortagga qulqulka qulqulka). Sida caadiga ah, waa 'clippingParents' oo aqbali kartaa tixraaca HTMLElement (iyada oo loo marayo JavaScript kaliya). Wixii macluumaad dheeraad ah tixraac Popper's detectOverflow docs . |
container |
xadhig, element, been | false |
Waxay ku dhejisaa caarada aaladda shay gaar ah. Tusaale container: 'body' :. Doorashadani waxay si gaar ah faa'iido u leedahay in ay kuu ogolaato inaad ku dhejiso qalabka wax lagu duubo ee qulqulka dukumeentiga u dhow curiyaha kiciya - taas oo ka ilaalin doonta qalabku inuu ka sabbeeyo xubinta kicinta inta lagu jiro cabbirka daaqada. |
customClass |
xadhig, function | '' |
Casharo ku dar tilmaanta qalabka marka la tuso. Ogsoonow in fasalladan lagu dari doono marka lagu daro fasal kasta oo lagu qeexay qaab-dhismeedka. Si loogu daro fasalo badan, ku kala saar meelo banaan: 'class-1 class-2' . Waxa kale oo aad gudbin kartaa hawl soo celinaysa hal xadhig oo ay ku jiraan magacyo dheeraad ah. |
delay |
nambar, shay | 0 |
Dib u dhigista muujinta iyo qarinta aaladda (ms) -kuma khusayso nooca kiciya gacanta. Haddii nambar la keeno, dib u dhac ayaa lagu dabaqayaa qarinta/muujinta labadaba. Qaab dhismeedka shaygu waa delay: { "show": 500, "hide": 100 } :. |
fallbackPlacements |
diyaarin | ['top', 'right', 'bottom', 'left'] |
Qeex meelaynta dib u dhaca adiga oo siinaya liis meelayn ah (sida ay u kala door bidaan). Wixii macluumaad dheeraad ah tixraac dukumeentiyada dhaqanka Popper . |
html |
booliyan | false |
Oggolow HTML in uu ku jiro tibaaxaha. Haddi ay run tahay, HTML tags in tooltip's title waxaa lagu soo bandhigayaa qalab tip. Haddii ay been tahay, innerText hantida waxaa loo isticmaali doonaa in lagu geliyo DOM. Isticmaal qoraal haddii aad ka welwelsan tahay weerarrada XSS. |
offset |
habayn, xadhig, shaqo | [0, 0] |
Deminta tibaaxaha qalabka marka loo eego bartilmaameedkiisa. Waxaad ku gudbin kartaa xarriiq sifada xogta oo wadata qiyam kala soocan sida: data-bs-offset="10,20" . Marka hawl loo isticmaalo in lagu go'aamiyo dhimista, waxa loogu yeedhaa shay ka kooban meelaynta popper, tixraaca, iyo popper rects sida doodiisa kowaad. Xubinta kicinta ee DOM node waxa loo gudbiyaa sidii doodda labaad. Shaqadu waa inay soo celisaa array leh laba lambar: boodboodka , fogaanta . Macluumaad dheeraad ah ka eeg dukumeentiyada dhimista ee Popper . |
placement |
xadhig, function | 'top' |
Sida loo dhigo tibaaxaha qalabka: auto, sare, hoose, bidix, midig. Marka auto la cayimo, waxay si firfircoon dib u habayn doontaa tibaaxaha qalabka. Marka hawl loo isticmaalo si loo go'aamiyo meelaynta, waxa loogu yeedhaa qalabka DOM node oo ah doodiisa koowaad iyo curiyaha DOM node oo ah kan labaad. Macnaha this guud waxa loo dejiyay tusaalaha tibaaxaha. |
popperConfig |
waxba, shay, shaqo | null |
Si aad u bedesho Bootstrap's default Popper config, arag qaabka Popper's . Marka hawl loo isticmaalo in lagu abuuro qaabaynta Popper, waxa loogu yeedhaa shay ka kooban qaabaynta Bootstrap ee caadiga ah ee Popper. Waxay kaa caawinaysaa inaad isticmaasho oo aad ku darto qaabka caadiga ah iyo qaabayntaada. Shaqadu waa inay soo celisaa shayga qaabaynta ee Popper. |
sanitize |
booliyan | true |
Daar ama dami nadaafadda Haddii la hawlgeliyo 'template' , 'content' iyo 'title' fursadaha waa la nadiifin doonaa. |
sanitizeFn |
waxba, shaqo | null |
Halkan waxa aad ku keeni kartaa shaqadaada nadaafadda. Tani waxay noqon kartaa mid faa'iido leh haddii aad doorbidayso inaad isticmaasho maktabad gaar ah si aad u sameyso nadaafadda. |
selector |
xadhig, been | false |
Haddii la bixiyo doorasho, walxaha tibaaxaha ah waxaa loo igman doonaa bartilmaameedyada la cayimay. Ficil ahaan, tan waxaa sidoo kale loo isticmaalaa in lagu dabaqo aaladaha aaladaha si firfircoon loogu daray walxaha DOM ( jQuery.on taageerada). Bal u fiirso arrintan iyo tusaale wargelin ah . |
template |
xadhig | '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' |
Saldhig HTML si aad u isticmaasho marka la abuurayo tip-ka. Tilmaamaha qalabka title ayaa lagu duri doonaa .tooltip-inner . .tooltip-arrow waxa ay noqon doontaa fallaadho tibta aalada. Cutubka duubka ugu dambeeya waa inuu lahaadaa .tooltip fasalka iyo role="tooltip" . |
title |
xadhig, element, function | '' |
Qiimaha cinwaanka caadiga ah haddii title sifadu aanay jirin. Haddii shaqo la bixiyo, waxa loo yeedhi doonaa iyada oo this tixraaceeda loo dejiyey curiyaha popover-ku ku dheggan yahay. |
trigger |
xadhig | 'hover focus' |
Sida aaladda loo kiciyo: guji, dul heehaab, diiradda, buug-gacmeed. Waxaad ka gudbi kartaa kiciyeyaasha badan; kala saar meel bannaan. 'manual' waxay tusinaysaa in tibaaxaha qalabka lagu kicin doono barnaamij ahaan iyada oo loo marayo .tooltip('show') , .tooltip('hide') iyo .tooltip('toggle') hababka; Qiimahan laguma dari karo kiciye kale. 'hover' Keligeed waxay keenaysaa tilmaamo aan lagu kicin karin kiiboodhka, waana in la isticmaalo oo keliya haddii habab kale oo loogu gudbinayo isla macluumaadka isticmaalayaasha kiiboodhka ay jiraan. |
Sifooyinka xogta ee aaladaha gaarka ah
Ikhtiyaarada aaladaha gaarka ah waxaa lagu qeexi karaa iyadoo la adeegsanayo sifooyinka xogta, sida kor lagu sharaxay.
Isticmaalka shaqada lehpopperConfig
const tooltip = new bootstrap.Tooltip(element, {
popperConfig(defaultBsPopperConfig) {
// const newPopperConfig = {...}
// use defaultBsPopperConfig if needed...
// return newPopperConfig
}
})
Hababka
Hababka iyo kala-guurka aan isku midka ahayn
Dhammaan hababka API waa isku mid waxayna bilaabaan kala-guurka . Waxay ku soo noqdaan qofka soo wacaya isla markii uu bilaabmo kala-guurka laakiin ka hor inta uusan dhammaan . Intaa waxaa dheer, hab ku baaqaya in qayb ka beddelka waa la iska indhatiray .
Ka eeg dukumeentiyada JavaScript wixii macluumaad dheeraad ah .
Habka | Sharaxaada |
---|---|
disable |
Waxay meesha ka saartaa awoodda qalabka curiyaha in la muujiyo. Qalabka tilmaanta waxa la tusi karaa oo keliya haddii dib loo hawlgeliyo. |
dispose |
Wuxuu qariyaa oo baabi'iyaa aaladda curiyaha (Waxay meesha ka saartaa xogta la kaydiyay ee cunsurka DOM). Aaladaha adeegsada ergada (kuwaaso la abuuray iyadoo la isticmaalayo ikhtiyaarka selector ) si gaar ah looma baabi'in karo walxaha kiciya faraca. |
enable |
Waxay siisaa aalada curiyaha awoodda lagu tuso. Tilmaamaha qalabku waa la dajiyay. |
getInstance |
Habka joogtada ah kaas oo kuu ogolaanaya inaad hesho tusaalaha qalabaynta ee la xidhiidha curiyaha DOM, ama abuurto mid cusub haddii aan la bilaabin. |
getOrCreateInstance |
Habka joogtada ah kaas oo kuu ogolaanaya inaad hesho tusaalaha qalabaynta ee la xidhiidha curiyaha DOM, ama abuurto mid cusub haddii aan la bilaabin. |
hide |
Wuxuu qariyaa calaamadda curiyaha. Ku soo noqda qofka soo wacay ka hor inta aan la qarin qalabka wax lagu qoro (tusaale ka hor intaanay hidden.bs.tooltip dhacdada dhicin). Tan waxa loo tixgaliyaa “handual” kicinta qalabka. |
setContent |
Wuxuu bixiyaa hab lagu beddelo nuxurka aaladda ka dib markii la bilaabay. |
show |
Waxay daaha ka qaadaysaa aaladda curiyaha Ku soo noqda qofka soo wacay ka hor inta aan aalada qalabku dhab ahaan la muujin (tusaale ka hor intaanay shown.bs.tooltip dhacdada dhicin). Tan waxa loo tixgaliyaa “handual” kicinta qalabka. Tilmaamaha qalabka leh cinwaanno eber ah weligood lama soo bandhigin. |
toggle |
Beddelayaa shay raadka. Ku soo noqda qofka soo wacay ka hor inta aan aalada qalabku dhab ahaan la muujin ama la qarin (tusaale ka hor inta aanay dhacdada shown.bs.tooltip ama hidden.bs.tooltip dhacdada dhicin). Tan waxa loo tixgaliyaa “handual” kicinta qalabka. |
toggleEnabled |
Waxay beddeshaa awoodda aaladda curiyaha si loo muujiyo ama loo qariyo. |
update |
Waxay cusboonaysiisaa booska tibaaxaha curiyaha. |
const tooltip = bootstrap.Tooltip.getInstance('#example') // Returns a Bootstrap tooltip instance
// setContent example
tooltip.setContent({ '.tooltip-inner': 'another title' })
setContent
ayaa aqbalaya
object
dood, halkaas oo fure kasta oo hanti ah uu yahay
string
dooriye sax ah oo ku dhex jira qaabka popover, iyo mid kasta oo la xidhiidha hantida-qiimaha waxay noqon kartaa
string
|
element
|
function
|
null
Dhacdooyinka
Dhacdo | Sharaxaada |
---|---|
hide.bs.tooltip |
Dhacdadan ayaa isla markaaba la eryaa marka hide habka tusaale ahaan loo waco. |
hidden.bs.tooltip |
Dhacdadan waxa la eryaa marka popover uu dhammeeyo in laga qariyo isticmaalaha (waxa ay sugi doontaa inta uu CSS ka gudbayo dhamaystirka). |
inserted.bs.tooltip |
Dhacdadan ayaa la eryaa dhacdada ka dib show.bs.tooltip marka qaabka qalabaynta lagu daro DOM. |
show.bs.tooltip |
Dhacdadani waxay isla markaaba gubataa marka show habka tusaalaha la yiraahdo. |
shown.bs.tooltip |
Dhacdadan waxa la eryaa marka popover-ka laga dhigo mid la arki karo isticmaaluhu (waxay sugi doontaa inta uu CSS ka gudbayo dhamaystirka). |
const myTooltipEl = document.getElementById('myTooltip')
const tooltip = bootstrap.Tooltip.getOrCreateInstance(myTooltipEl)
myTooltipEl.addEventListener('hidden.bs.tooltip', () => {
// do something...
})
tooltip.hide()