Yeqela kokuqukethwe okuyinhloko Yeqela ku-docs navigation
Check
in English

Amathuluzi

Amadokhumenti nezibonelo zokwengeza amathiphu e-Bootstrap ngokwezifiso nge-CSS ne-JavaScript kusetshenziswa i-CSS3 yokugqwayiza kanye nedatha-bs-izibaluli zokugcinwa kwesihloko sasendaweni.

Uhlolojikelele

Izinto okufanele uzazi uma usebenzisa i-plugin ithiphu yamathuluzi:

  • Amathuluzi ancike kulabhulali yenkampani yangaphandle ye- Popper ukuze ibekwe. Kufanele ufake i -popper.min.js ngaphambili bootstrap.js, noma usebenzise eyodwa bootstrap.bundle.min.jsequkethe i-Popper.
  • Izeluleko zokungena ngezizathu zokusebenza, ngakho-ke kuzomele uziqalise ngokwakho .
  • Amathuluzi anezihloko zobude obunguziro awaboniswa.
  • Cacisa container: 'body'ukuze ugweme ukunikeza izinkinga ngezingxenye eziyinkimbinkimbi (njengamaqembu ethu okokufaka, amaqembu wezinkinobho, njll).
  • Ukucupha amathiphu kuzinto ezifihliwe ngeke kusebenze.
  • .disabledAmathuluzi noma ama- disabledelementi kufanele acushwe ku -elementi yokugoqa.
  • Uma icushwa isuka kuma-hyperlink anemigqa eminingi, amathiphu amathuluzi azobekwa phakathi nendawo. Sebenzisa white-space: nowrap;kweyakho <a>ukugwema lokhu kuziphatha.
  • Izeluleko zamathuluzi kufanele zifihlwe ngaphambi kokuthi izici ezihambisanayo zikhishwe ku-DOM.
  • Izeluleko zamathuluzi zingaqaliswa ngenxa yento engaphakathi kwesithunzi se-DOM.

Unakho konke lokho? Kuhle, ake sibone ukuthi basebenza kanjani ngezinye izibonelo.

Ngokuzenzakalelayo, le ngxenye isebenzisa isibulali magciwane esakhelwe ngaphakathi, esihlubula noma yiziphi izici ze-HTML ezingavunyelwe ngokusobala. Bona isigaba se-sanitizer emibhalweni yethu ye-JavaScript ukuze uthole imininingwane eyengeziwe.
Umthelela wokugqwayiza wale ngxenye uncike prefers-reduced-motionembuzweni wemidiya. Bona ingxenye yokunyakaza encishisiwe yemibhalo yethu yokufinyeleleka .

Izibonelo

Nika amandla amathiphu

Njengoba kushiwo ngenhla, kufanele uqalise amathiphu wamathuluzi ngaphambi kokuthi asetshenziswe. Enye indlela yokuqalisa wonke amathiphu ekhasini kuzoba ukuwakhetha ngesibaluli sawo data-bs-toggle, njengalokhu:

const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))

Hambisa phezulu kwezixhumanisi ezingezansi ukuze ubone amathuluzi:

Umbhalo wesimeli ukukhombisa izixhumanisi ezingaphakathi kolayini namathiphu wamathuluzi. Lokhu manje sekuwukugcwalisa nje, akukho mbulali. Okuqukethwe okubekwe lapha ukuze nje kulingise ubukhona bombhalo wangempela . Futhi konke lokho nje ukukunikeza umbono wokuthi izeluleko zamathuluzi zingabukeka kanjani uma zisetshenziswa ezimeni zomhlaba wangempela. Ngakho-ke ngethemba ukuthi usubonile manje ukuthi lawa macebiso amathuluzi ezixhumanisi angasebenza kanjani, uma usuwasebenzisa kusayithi lakho noma iphrojekthi.

html
<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>
Zizwe ukhululekile ukusebenzisa titlenoma data-bs-titleku-HTML yakho. Uma titleisetshenziswa, i-Popper izoyishintsha ngokuzenzakalelayo data-bs-titlelapho isetshenziswa.

Amathiphu wamathuluzi ngokwezifiso

Kwengezwe ku-v5.2.0

Ungenza ngendlela oyifisayo ukubukeka kwamathiphu wamathuluzi usebenzisa okuguquguqukayo kwe-CSS . Sisetha ikilasi langokwezifiso data-bs-custom-class="custom-tooltip"ukuze sinwebe ukubukeka kwethu kwangokwezifiso futhi sikusebenzisele ukubhala ngaphezulu okuhlukile kwendawo ye-CSS.

.custom-tooltip {
  --bs-tooltip-bg: var(--bs-primary);
}
html
<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>

Izikhombisi-ndlela

Hambisa phezulu kwezinkinobho ezingezansi ukuze ubone izikhombisi-ndlela zamathuluzi amane: phezulu, kwesokudla, phansi, nakwesokunxele. Izikhombisi-ndlela ziboniswa uma usebenzisa i-Bootstrap ku-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>

Futhi nge-HTML yangokwezifiso yengezwe:

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

Nge-SVG:

CSS

Okuguquguqukayo

Kwengezwe ku-v5.2.0

Njengengxenye yendlela yokuguquguquka kwe-CSS ye-Bootstrap, izeluleko zamathuluzi manje zisebenzisa okuguquguqukayo kwasendaweni kwe-CSS .tooltipukuze kwenziwe ngokwezifiso isikhathi sangempela esithuthukisiwe. Amanani okuguquguquka kwe-CSS asethwa nge-Sass, ngakho ukwenza ngokwezifiso kwe-Sass kusasekelwa, nakho.

  --#{$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};
  

Izinguquko ze-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

Ukusetshenziswa

I-plugin yethulithiphu ikhiqiza okuqukethwe kanye nemakhaphu ngokufunwayo, futhi ngokuzenzakalelayo beka izeluleko zamathuluzi ngemva kwesici sokucupha.

Qalisa ithiphu yamathuluzi nge-JavaScript:

const exampleEl = document.getElementById('example')
const tooltip = new bootstrap.Tooltip(exampleEl, options)
Ukuchichima autofuthiscroll

Indawo yethulithiphu izama ukuzishintsha ngokuzenzakalelayo uma isiqukathi esingumzali sine overflow: autonoma overflow: scrollsithanda .table-responsive, kodwa sigcine indawo yokubeka yasekuqaleni. Ukuze uxazulule lokhu, setha boundaryinketho (yesilungisi se-flip usebenzisa popperConfiginketho) kunoma iyiphi i-HTMLElement ukuze ukhiphe inani elizenzakalelayo, 'clippingParents', njengokuthi document.body:

const tooltip = new bootstrap.Tooltip('#example', {
  boundary: document.body // or document.querySelector('#boundary')
})

Imakhaphu

Imakhaphu edingekayo yethiphu yamathuluzi iyisibaluli kuphela datafuthi titleengxenyeni ye-HTML ofisa ukuba nayo ithiphu. Imakhaphu ekhiqiziwe yethiphu yamathuluzi ilula, nakuba idinga indawo (ngokuzenzakalelayo, isethwe topyi-plugin).

Ukwenza izeluleko zamathuluzi zisebenzele abasebenzisi bekhibhodi nobuchwepheshe obusizayo

Kufanele wengeze kuphela izeluleko zamathuluzi ezintweni ze-HTML ngokuvamile ezigxile kukhibhodi futhi ezisebenzisanayo (njengezixhumanisi noma izilawuli zefomu). Nakuba izakhi ze-HTML ezingafanele (ezifana no- <span>s) zingenziwa zigxile ngokwengeza tabindex="0"isibaluli, lokhu kuzongeza izitobhi zamathebhu ezingase zicasule futhi zidideke ezintweni ezingahlangani kubasebenzisi bekhibhodi, futhi ubuchwepheshe obuningi obusizayo okwamanje abumemezeli ithiphu yamathuluzi kulesi simo. Ukwengeza, unganciki kuphela hovernjengesicuphi sethiphu yakho yamathuluzi, njengoba lokhu kuzokwenza ukuthi izethulo zakho zamathuluzi zingakwazi ukuqalisa kubasebenzisi bekhibhodi.

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

Izakhi ezikhutshaziwe

Ama- disabledelementi anesibaluli awahlangani, okusho ukuthi abasebenzisi abakwazi ukugxila, ukuhambisa phezulu, noma ukuwachofoza ukuze baqalise ithiphu yamathuluzi (noma i-popover). Njengendlela yokusebenza, uzofuna ukuqalisa ithiphu yamathuluzi kusuka kusisonga <div>noma <span>, kwenziwe kahle ukuthi kugxilwe kukhibhodi usebenzisa tabindex="0".

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

Izinketho

Njengoba izinketho zingadluliswa ngezibaluli zedatha noma i-JavaScript, ungakwazi ukwengeza igama lenketho kokuthi data-bs-, njengaku data-bs-animation="{value}". Qiniseka ukuthi ushintsha uhlobo lwekesi legama lenketho lisuka ku- “ camelCase ” liye ku- “ kebab-case ” lapho udlulisa izinketho ngezibaluli zedatha. Isibonelo, sebenzisa data-bs-custom-class="beautifier"esikhundleni se- data-bs-customClass="beautifier".

Kusukela ku-Bootstrap 5.2.0, zonke izingxenye zisekela isibaluli sedatha egodliwe esihlolwayodata-bs-config esingafaka ukucushwa kwengxenye elula njengochungechunge lwe-JSON. Uma into inezibaluli , inani lokugcina lizoba data-bs-config='{"delay":0, "title":123}'futhi izibaluli zedatha ezihlukene zizokhipha amanani anikezwe ngomhla ka- . Ngaphezu kwalokho, izibaluli zedatha ezikhona ziyakwazi ukubeka amanani e-JSON afana .data-bs-title="456"title456data-bs-configdata-bs-delay='{"show":0,"hide":150}'

Qaphela ukuthi ngenxa yezizathu zokuphepha i- sanitize, sanitizeFn, allowListnezinketho azikwazi ukunikezwa kusetshenziswa izibaluli zedatha.
Igama Uhlobo Okuzenzakalelayo Incazelo
allowList into Inani elizenzakalelayo Into equkethe izibaluli namathegi avunyelwe.
animation boolean true Faka inguquko ye-CSS fade ethiphu yamathuluzi.
boundary umucu, isici 'clippingParents' Umkhawulo owumkhawulo wokuchichima wethiphu yamathuluzi (usebenza kuphela kusilungisi se-Popper's preventOverflow). Ngokuzenzakalelayo, iyona 'clippingParents'futhi ingamukela ireferensi ye-HTMLElement (nge-JavaScript kuphela). Ukuze uthole ulwazi olwengeziwe bheka amadokhumenti e-Popper's detectOverflow .
container umucu, isici, amanga false Yengeza ithiphu entweni ethile. Isibonelo: container: 'body'. Le nketho iwusizo kakhulu ngoba ikuvumela ukuthi ubeke ithiphu yamathuluzi ekugelezeni kwedokhumenti eduze kwento ecuphayo - okuzovimbela ithiphu yamathuluzi ekuntanteni isuke ku-elementi ecuphayo ngesikhathi sokushintsha usayizi wewindi.
customClass umucu, umsebenzi '' Engeza amakilasi ethiphu yamathuluzi uma ikhonjiswa. Qaphela ukuthi lawa makilasi azokwengezwa ngaphezu kwanoma yimaphi amakilasi ashiwo kusifanekiso. Ukwengeza amakilasi amaningi, wahlukanise ngezikhala: 'class-1 class-2'. Ungakwazi futhi ukudlulisa umsebenzi okufanele ubuyisele uchungechunge olulodwa oluqukethe amagama ekilasi engeziwe.
delay inombolo, into 0 Ukubambezeleka kokubonisa nokufihla ithiphu yamathuluzi (ms)—akusebenzi ohlotsheni lwesibangeli okwenziwa mathupha. Uma inombolo inikezwa, ukubambezeleka kusetshenziswa kukho kokubili ukufihla/umbukiso. Isakhiwo sento sithi: delay: { "show": 500, "hide": 100 }.
fallbackPlacements uhlu ['top', 'right', 'bottom', 'left'] Chaza ukubekwa emuva ngokunikeza uhlu lokubekwa ngokulandelana (ngokulandelana kokuthandayo). Ukuze uthole ulwazi olwengeziwe bheka amadokhumenti okuziphatha ka-Popper .
html boolean false Vumela i-HTML ethiphu yamathuluzi. Uma kuyiqiniso, omaka be-HTML bathiphu titlebazonikezwa kuthulithiphu. Uma kungamanga, innerTextisakhiwo sizosetshenziselwa ukufaka okuqukethwe ku-DOM. Sebenzisa umbhalo uma ukhathazekile ngokuhlaselwa kwe-XSS.
offset uhlu, umucu, umsebenzi [0, 0] I-offset yethiphu yamathuluzi ngokuhlobene nokuhlosiwe kwayo. Ungadlulisa uchungechunge kuzibaluli zedatha ngamavelu ahlukaniswe ngokhefana afana nalawa: data-bs-offset="10,20". Uma umsebenzi usetshenziselwa ukunquma i-offset, ubizwa ngento equkethe ukubekwa kwe-popper, ireferensi, kanye ne-popper rects njengempikiswano yayo yokuqala. Into eqalisayo inodi ye-DOM idluliswa njengempikiswano yesibili. Umsebenzi kufanele ubuyisele amalungu afanayo anezinombolo ezimbili: ukushushuluza , ibanga . Ukuze uthole ulwazi olwengeziwe bheka amadokhumenti e-Popper's offset .
placement umucu, umsebenzi 'top' Indlela yokubeka ithiphu yamathuluzi: okuzenzakalelayo, phezulu, phansi, kwesokunxele, kwesokudla. Uma autokucacisiwe, izohlela kabusha ithiphu lamathuluzi ngamandla. Uma umsebenzi usetshenziselwa ukunquma ukubekwa, ubizwa ngenodi yethulithiphu ye-DOM njenge-agumenti yayo yokuqala kanye nenodi yento ecuphayo ethi DOM njengesibili. Umongo thisusethelwe kusibonelo sethiphu yamathuluzi.
popperConfig null, into, umsebenzi null Ukuze uguqule ukucushwa kwe-Popper okuzenzakalelayo kwe-Bootstrap, bona ukucushwa kwe-Popper . Uma umsebenzi usetshenziselwa ukudala ukucushwa kwe-Popper, kubizwa ngento equkethe ukucushwa kwe-Popper okuzenzakalelayo kwe-Bootstrap. Ikusiza ukuthi usebenzise futhi uhlanganise okumisiwe nokucushwa kwakho. Umsebenzi kufanele ubuyisele into yokumisa ye-Popper.
sanitize boolean true Nika amandla noma vala ukukhucululwa kwendle. Uma yenziwe yasebenza 'template', 'content'futhi 'title'izinketho zizohlanzwa.
sanitizeFn null, umsebenzi null Lapha ungakwazi ukunikeza umsebenzi wakho we-sanitize. Lokhu kungaba usizo uma ukhetha ukusebenzisa umtapo wolwazi ozinikele ukwenza ukukhucululwa kwendle.
selector intambo, amanga false Uma kunikezwa isikhethi, izinto zethiphu yamathuluzi zizodluliselwa kulokho okuhlosiwe okucacisiwe. Empeleni, lokhu kusetshenziselwa ukusebenzisa namathiphu wamathuluzi kuma-elementi e-DOM angezwe ngamandla ( jQuery.onusekelo). Bheka lolu daba kanye nesibonelo esifundisayo .
template umucu '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' Isisekelo se-HTML ongasisebenzisa lapho udala ithiphu yamathuluzi. I-tooltip titleizojovwa ku- .tooltip-inner. .tooltip-arrowizoba umcibisholo wethiphu yamathuluzi. I-elementi yokugoqa engaphandle kufanele ibe .tooltipnekilasi kanye role="tooltip".
title umucu, isici, umsebenzi '' Inani lesihloko elizenzakalelayo uma titleisibaluli singekho. Uma umsebenzi unikiwe, uzobizwa thisnereferensi yawo esethwe ku-elementi i-popover enamathiselwe kuyo.
trigger umucu 'hover focus' Ithiphu yamathuluzi icushwa kanjani: chofoza, hambisa phezulu, gxila, imanuwali. Ungadlula izibangeli eziningi; abahlukanise ngesikhala. 'manual'ibonisa ukuthi ithiphu lamathuluzi lizoqaliswa ngokohlelo nge- .tooltip('show'), .tooltip('hide')kanye .tooltip('toggle')nezindlela; leli nani alikwazi ukuhlanganiswa nanoma yisiphi esinye isiqalisi. 'hover'ngokwalo kuzoholela kumathiphu amathuluzi angeke acushwe ngekhibhodi, futhi kufanele asetshenziswe kuphela uma ezinye izindlela zokudlulisa ulwazi olufanayo lwabasebenzisi bekhibhodi zikhona.

Izibaluli zedatha zamathiphu wamathuluzi angawodwana

Izinketho zamathiphu wamathuluzi ngamanye zingacaciswa ngokusebenzisa izibaluli zedatha, njengoba kuchazwe ngenhla.

Ukusebenzisa umsebenzi ngepopperConfig

const tooltip = new bootstrap.Tooltip(element, {
  popperConfig(defaultBsPopperConfig) {
    // const newPopperConfig = {...}
    // use defaultBsPopperConfig if needed...
    // return newPopperConfig
  }
})

Izindlela

Izindlela ze-Asynchronous kanye noshintsho

Zonke izindlela ze-API azivumelanisi futhi ziqala inguquko . Babuyele kofonayo uma sekuqalwa uguquko kodwa lungakapheli . Ngokungeziwe, ikholi yendlela engxenyeni yoshintsho izozitshwa .

Bheka imibhalo yethu ye-JavaScript ukuze uthole ulwazi olwengeziwe .

Indlela Incazelo
disable Isusa ikhono lethulithiphu yento ezoboniswa. Ithiphu yamathuluzi izokwazi ukuboniswa kuphela uma inikwe amandla kabusha.
dispose Ifihla futhi ibhubhise ithiphu ye-elementi (Isusa idatha egciniwe kusici se-DOM). Amathuluzi asebenzisa ukuthunyelwa (okudalwe kusetshenziswa inkethoselector ) awakwazi ukucekelwa phansi ngamanye ezintweni ezibangela inzalo .
enable Inikeza ithuluzi le-elementi ikhono lokuboniswa. Amathiphu amathuluzi anikwe amandla ngokuzenzakalela.
getInstance Indlela emile ekuvumela ukuthi uthole isibonelo sethiphu yamathuluzi esihlotshaniswa nento ye-DOM, noma udale entsha uma kwenzeka ingaqaliswanga.
getOrCreateInstance Indlela emile ekuvumela ukuthi uthole isibonelo sethiphu yamathuluzi esihlotshaniswa nento ye-DOM, noma udale entsha uma kwenzeka ingaqaliswanga.
hide Ifihla ithiphu yento ethile. Ibuyela kofonayo ngaphambi kokuthi ithiphu yamathuluzi ifihlekile (okungukuthi ngaphambi kokuthi hidden.bs.tooltipkwenzeke umcimbi). Lokhu kuthathwa njengokucupha “okuzenzela” ithiphu yamathuluzi.
setContent Inikeza indlela yokushintsha okuqukethwe ithiphu lamathuluzi ngemva kokuqaliswa kwalo.
show Iveza ithulithiphu yento ethile. Ibuyela kofonayo ngaphambi kokuthi ithiphu yamathuluzi iboniswe (okungukuthi ngaphambi kokuthi shown.bs.tooltipkwenzeke umcimbi). Lokhu kuthathwa njengokucupha “okuzenzela” ithiphu yamathuluzi. Amathuluzi anezihloko zobude obunguziro awaboniswa.
toggle Iguqula ithiphu lethuluzi le-elementi. Ibuyela kofonayo ngaphambi kokuthi ithiphu yamathuluzi iboniswe noma ifihlwe (okungukuthi ngaphambi kokuthi kwenzeke shown.bs.tooltipnoma hidden.bs.tooltipkwenzeke). Lokhu kuthathwa njengokucupha “okuzenzela” ithiphu yamathuluzi.
toggleEnabled Iguqula ikhono lethulithiphu yento ukuthi iboniswe noma ifihlwe.
update Ibuyekeza indawo yethulithiphu yento.
const tooltip = bootstrap.Tooltip.getInstance('#example') // Returns a Bootstrap tooltip instance

// setContent example
tooltip.setContent({ '.tooltip-inner': 'another title' })
Indlela setContentyamukela objectimpikiswano, lapho ukhiye wendawo ngayinye uyisikhethi esivumelekile stringngaphakathi kwesifanekiso se-popover, futhi inani lesakhiwo ngalinye elihlobene lingaba string| element| function| null

Imicimbi

Umcimbi Incazelo
hide.bs.tooltip Lo mcimbi uxoshwa ngokushesha lapho hideindlela yesibonelo ibizwa.
hidden.bs.tooltip Lo mcimbi uyaxoshwa uma i-popover isiqedile ukufihlwa kumsebenzisi (izolinda ukuthi izinguquko ze-CSS ziqedele).
inserted.bs.tooltip Lo mcimbi uxoshwa ngemva show.bs.tooltipkomcimbi lapho ithempulethi yethulithiphu yengezwe ku-DOM.
show.bs.tooltip Lo mcimbi uvutha ngokushesha lapho showindlela yesibonelo ibizwa.
shown.bs.tooltip Lo mcimbi uxoshwa lapho i-popover yenziwe yabonakala kumsebenzisi (izolinda ukuthi izinguquko ze-CSS ziqedele).
const myTooltipEl = document.getElementById('myTooltip')
const tooltip = bootstrap.Tooltip.getOrCreateInstance(myTooltipEl)

myTooltipEl.addEventListener('hidden.bs.tooltip', () => {
  // do something...
})

tooltip.hide()