Fa'ase'e ile anotusi autu Fa'ase'e ile su'ega fa'amatalaga
Check
in English

Mea faigaluega

Faʻamaumauga ma faʻataʻitaʻiga mo le faʻaopoopoina o tuʻufaʻatasiga Bootstrap meafaigaluega faʻatasi ma le CSS ma le JavaScript e faʻaaoga ai le CSS3 mo faʻafiafiaga ma faʻamaumauga-bs-uiga mo le teuina o igoa faʻapitonuʻu.

Vaaiga lautele

Mea e tatau ona iloa pe a faʻaaogaina le meafaigaluega faʻapipiʻi:

  • Mea faigaluega fa'alagolago ile faletusi lona tolu Popper mo le fa'atulagaina. E tatau ona e aofia ai popper.min.js muamua bootstrap.js, pe fa'aaoga se tasi bootstrap.bundle.min.jse iai Popper.
  • O mea faigaluega e filifili i totonu mo mafuaʻaga o faʻatinoga, o lea e tatau ai ona e amataina oe lava ia .
  • E le fa'aalia lava ni mea faigaluega e leai ni fa'ailoga umi.
  • Fa'ama'oti container: 'body'e 'alofia ai le fa'atupuina o fa'afitauli i vaega e sili atu ona lavelave (pei o tatou vaega fa'aoga, vaega fa'amau, ma isi).
  • E le aoga le fa'aosoina o mea faigaluega i elemene natia.
  • O mea faigaluega mo .disabledpo'o disabledelemene e tatau ona fa'aoso i luga o se elemene afifi.
  • A fa'aoso mai hyperlinks e tele laina, o le a fa'atotonugalemu mea faigaluega. Fa'aoga white-space: nowrap;i lou <a>s e aloese ai mai lenei amio.
  • E tatau ona natia mea faigaluega a'o le'i aveesea a latou elemene tutusa mai le DOM.
  • Tooltips e mafai ona faʻaosoina faʻafetai i se elemene i totonu o se ata lafoia DOM.

E maua uma na mea? Lelei, se'i o tatou va'ai pe fa'apefea ona latou galulue fa'atasi ma ni fa'ata'ita'iga.

Ona o le le mafai, o lenei vaega e faʻaaogaina le mea faʻapipiʻi mea faʻapipiʻi, lea e aveese ai soʻo se elemene HTML e le faʻatagaina manino. Va'ai le vaega sanitizer i la matou pepa JavaScript mo nisi fa'amatalaga.
O le aafiaga o le animation o lenei vaega e fa'alagolago i le su'esu'ega a le prefers-reduced-motionaufaasālalau. Va'ai le vaega fa'aitiitiga fa'aitiitiga oa matou pepa fa'aoga avanoa .

Faataitaiga

Fa'aaga mea faigaluega

E pei ona taʻua i luga, e tatau ona e amataina meafaigaluega aʻo leʻi faʻaaogaina. O se tasi o auala e amata ai meafaigaluega uma i luga o se itulau o le filifilia lea i latou data-bs-toggleuiga, pei o lea:

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

Fa'apa i luga o so'oga o lo'o i lalo e va'ai i mea faigaluega:

Fa'amatalaga o lo'o tu'u iai e fa'aalia ai nisi o feso'ota'iga fa'atasi ma mea faigaluega. O lea ua na'o le fa'atumu, leai se fasioti tagata. O mea o lo'o tu'uina iinei e fa'atusa ai le iai o tusitusiga moni . Ma o na mea uma e naʻo le tuʻuina atu ia te oe o se manatu pe faʻapefea ona foliga meafaigaluega pe a faʻaaogaina i tulaga moni o le lalolagi. Fa'amoemoe la ua e va'ai nei pe fa'apefea ona galue nei mea faigaluega i luga o so'otaga i le fa'atinoga, pe a e fa'aogaina i luga o lau lava saite po'o le poloketi.

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>
Lagona le saoloto e faʻaoga titlepe data-bs-titlei lau HTML. A titlefaʻaaogaina, Popper o le a suitulaga otometi i data-bs-titlele taimi e tuʻuina atu ai le elemene.

Fa'atonuga meafaigaluega

Fa'aopoopo i le v5.2.0

E mafai ona e faʻavasegaina foliga o meafaigaluega e faʻaaoga ai suiga CSS . Matou te setiina se vasega aganuʻu data-bs-custom-class="custom-tooltip"e faʻalautele ai o matou foliga masani ma faʻaaogaina e faʻafefe ai se fesuiaiga CSS i le lotoifale.

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

Fa'atonuga

Fa'ae'e i luga o fa'amau i lalo e va'ai ai fa'atonuga meafaigaluega e fa: luga, taumatau, lalo, ma le agavale. E fa'aata fa'atonuga pe a fa'aaoga Bootstrap ile 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>

Ma faʻatasi ai ma le HTML masani faʻaopoopo:

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

Faatasi ai ma se SVG:

CSS

Fuafuaga

Fa'aopoopo i le v5.2.0

I le avea ai o se vaega o le suiga o le CSS suiga a le Bootstrap, ua faʻaogaina nei e meafaigaluega faʻaoga suiga CSS faʻapitonuʻu i luga .tooltipmo le faʻaleleia o le taimi moni aganuʻu. O tau mo le CSS fesuiaiga e faʻatulagaina e ala i le Sass, o lea o loʻo lagolagoina pea le Sass customization.

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

Sass fesuiaiga

$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

Fa'aoga

O le tooltip plugin e fa'atupuina ai mea ma fa'ailoga pe a mana'omia, ma e le mafai ona tu'u meafaigaluega pe a mae'a a latou elemene fa'aoso.

Fa'aoso le mea faigaluega e ala ile JavaScript:

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

Ole tulaga ole Tooltip e taumafai e sui otometi pe a iai pe fiafia ile atigipusa matua ia tatou , ae o loʻo tumau pea le tulaga o le tuʻuina muamua. Ina ia foia lenei mea, seti le filifiliga (mo le faʻaoga suiga e faʻaaoga ai le filifiliga) i soʻo se HTMLElement e faʻamalo ai le tau le aoga, , e pei o le :overflow: autooverflow: scroll.table-responsiveboundarypopperConfig'clippingParents'document.body

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

Fa'ailoga

Ole fa'ailoga mana'omia mo se mea faigaluega e na'o se datauiga ma titleluga ole elemene HTML e te mana'o e maua se meafaigaluega. O le faʻailoga faʻatupuina o se meafaigaluega e faigofie tele, e ui lava e manaʻomia se tulaga (e ala i le faaletonu, seti i tople plugin).

Fa'aoga meafaigaluega mo keyboard ma fa'aoga tekonolosi fesoasoani

E tatau ona e fa'aopoopo na'o mea faigaluega i elemene HTML e masani ona fa'aogaina le keyboard ma fegalegaleai (pei o feso'ota'iga po'o fa'atonuga). E ui lava e mafai ona faʻaogaina elemene HTML (e pei o <span>le s) e ala i le faʻaopoopoina o le tabindex="0"uiga, o le a faʻaopoopoina ai faʻalavelave faʻalavelave ma fenumiai taofi i luga o elemene e le fesoʻotaʻi mo tagata faʻaoga keyboard, ma o le tele o tekinolosi fesoasoani i le taimi nei e le o faʻalauiloaina le meafaigaluega i lenei tulaga. E le gata i lea, aua le fa'alagolago na'o hoverle fa'aosoina o lau meafaigaluega, aua o le a le mafai ai e au meafaigaluega ona fa'aosoina mo tagata fa'aoga keyboard.

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

Elemene le atoatoa

O elemene e iai le disableduiga e le fegalegaleai, o lona uiga e le mafai e tagata faʻaoga ona taulaʻi, faʻafefe, pe kiliki i latou e faʻaosoina ai se meafaigaluega (poʻo le popover). I le avea ai o se fofo, e te manaʻo e faʻaosoina le meafaigaluega mai se afifi <div>poʻo <span>, faʻaoga lelei le keyboard-faʻaoga e faʻaaoga ai le 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>

Filifiliga

A'o mafai ona pasia filifiliga e ala i fa'amatalaga uiga po'o le JavaScript, e mafai ona e fa'aopoopoina se igoa filifiliga i le data-bs-, pei o le data-bs-animation="{value}". Ia mautinoa e sui le ituaiga mataupu o le igoa filifiliga mai le " CamelCase " i le " kebab-case " pe a pasia filifiliga e ala i faʻamatalaga uiga. Mo se faʻataʻitaʻiga, faʻaaoga data-bs-custom-class="beautifier"nai lo le data-bs-customClass="beautifier".

E pei o le Bootstrap 5.2.0, o vaega uma e lagolagoina se faʻataʻitaʻiga faʻaagaga faʻamaumauga uiga data-bs-confige mafai ona faʻapipiʻi faigofie vaega faʻapipiʻi o se manoa JSON. Afai ei ai se elemene data-bs-config='{"delay":0, "title":123}'ma data-bs-title="456"uiga, o le titletau mulimuli o le ai ai 456ma o faʻamatalaga faʻamatalaga uiga ese o le a faʻamalo ai tau o loʻo tuʻuina atu ile data-bs-config. E le gata i lea, o faʻamaumauga o loʻo i ai nei e mafai ona faʻapipiʻi JSON tau pei o data-bs-delay='{"show":0,"hide":150}'.

Manatua e le mafai ona tu'uina atu mo le saogalemu le sanitize, sanitizeFn, ma allowListfilifiliga e fa'aoga ai uiga fa'amaumauga.
Igoa Ituaiga Fa'atonu Fa'amatalaga
allowList mea faitino Tau fa'aletonu Mea e iai uiga fa'atagaina ma fa'ailoga.
animation boolean true Fa'aoga se suiga e mou atu CSS i le mea faigaluega.
boundary manoa, elemene 'clippingParents' Fa'agata fa'amama le tuaoi o le mea faigaluega (na'o le Popper's preventOverflow modifier). E le mafai, e 'clippingParents'mafai ma e mafai ona talia se HTMLElement reference (e ala i le JavaScript). Mo nisi fa'amatalaga va'ai ile Popper's detectOverflow docs .
container manoa, elemene, sese false Fa'apipi'i le mea faigaluega i se elemene fa'apitoa. Faataitaiga: container: 'body'. O lenei filifiliga e sili ona aoga ona e mafai ai e oe ona tuʻu le mea faigaluega i le tafe o le pepa i tafatafa o le elemene faʻaoso - lea o le a taofia ai le meafaigaluega mai le opeopea ese mai le elemene faʻaoso i le taimi o le suiga o le faamalama.
customClass manoa, galuega '' Fa'aopoopo vasega i le mea faigaluega pe a fa'aalia. Manatua o nei vasega o le a faʻaopoopoina i soʻo se vasega o loʻo faʻamaonia i le mamanu. Ina ia faaopoopo ni vasega se tele, tuueseese i avanoa: 'class-1 class-2'. E mafai fo'i ona e pasia se galuega e tatau ona toe fa'afo'i ai se manoa e tasi e iai isi igoa o vasega.
delay numera, mea 0 Fa'atuai ona fa'aali ma nana le mea faigaluega (ms)—e le fa'aoga ile ituaiga fa'aoso tusi. Afai e tu'uina atu se numera, fa'atuai e fa'aoga i natia/fa'aali uma. O le fausaga o mea faitino o le: delay: { "show": 500, "hide": 100 }.
fallbackPlacements fa'asologa ['top', 'right', 'bottom', 'left'] Fa'amatala tulaga fa'afo'i i tua e ala i le tu'uina atu o se lisi o tu'uga i le fa'asologa (i le fa'asologa o mea e fiafia i ai). Mo nisi faʻamatalaga vaʻai ile Popper's behavior docs .
html boolean false Fa'ataga le HTML i le mea faigaluega. Afai e sa'o, o fa'ailoga HTML o lo'o i totonu o meafaigaluega o le titlea fa'aalia i le meafaigaluega. Afai e sese, innerTexto le a fa'aoga meatotino e fa'aofi ai mea i totonu ole DOM. Fa'aoga tusitusiga pe a e popole i osofa'iga a le XSS.
offset fa'asologa, manoa, galuega [0, 0] Fa'a'ese'ese ole mea faigaluega e fa'atatau ile fa'amoemoe. E mafai ona e pasiina se manoa i fa'amatalaga uiga fa'atasi ai ma koma fa'atauva'a e pei o: data-bs-offset="10,20". A fa'aoga se galuega e fa'atatau ai le fa'a'ese'ese, e ta'ua i se mea o lo'o i ai le fa'aogaina o le popper, le fa'asinomaga, ma le popper rects e fai ma ana finauga muamua. O le fa'aosoina elemene DOM node ua pasia e fai ma finauga lona lua. Ole galuega e tatau ona toe fa'afo'i se laina e lua numera: fa'ase'e , mamao . Mo nisi fa'amatalaga va'ai ile Popper's offset docs .
placement manoa, galuega 'top' Fa'afefea ona fa'atulaga le mea faigaluega: ta'avale, luga, lalo, agavale, taumatau. A autofa'amaoti mai, o le a fa'amaninoina le fa'atonuga o meafaigaluega. Pe a faʻaaogaina se galuega e fuafua ai le tuʻuina, e taʻua i le tooltip DOM node e fai ma ana finauga muamua ma le elemene DOM node lona lua. O thislo'o fa'atulaga le tala i le fa'ata'ita'iga meafaigaluega.
popperConfig null, mea, galuega null Ina ia suia le faʻaogaina o le Popper config a Bootstrap, vaʻai i le faatulagaga a Popper . A faʻaaogaina se galuega e fai ai le Popper configuration, e valaʻau i se mea e aofia ai le faʻaogaina o le Popper configuration a le Bootstrap. E fesoasoani ia te oe e fa'aoga ma tu'ufa'atasia le mea e le mafai ona fai ma lau lava fa'atulagaga. Ole galuega e tatau ona toe faʻafoʻi se mea faʻatulagaina mo Popper.
sanitize boolean true Fa'amalo pe tape le fa'amama. Afai e fa'agaoioia 'template', 'content'ma 'title'filifiliga o le a fa'amama.
sanitizeFn null, galuega null O iinei e mafai ona e tuʻuina atu lau lava galuega faʻamamaina. E mafai ona aoga pe afai e te mana'o e fa'aoga se faletusi fa'apitoa e fa'atino ai le fa'amama.
selector manoa, sese false Afai e tu'uina atu se tagata filifilia, o mea fa'aoga meafaigaluega o le a tu'uina atu i fa'amoemoega fa'apitoa. I le faʻataʻitaʻiga, o loʻo faʻaaogaina e faʻaoga ai foi meafaigaluega e faʻaopoopo atili ai elemene DOM ( jQuery.onlagolago). Va'ai i lenei lomiga ma se fa'ata'ita'iga fa'amatalaga .
template manoa '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' Fa'avae HTML e fa'aoga pe a fai le mea faigaluega. O mea faigaluega o le titlea tui i totonu o le .tooltip-inner. .tooltip-arrowo le a avea ma aū a le meafaigaluega. O le elemene afifi pito i fafo e tatau ona i ai le .tooltipvasega ma role="tooltip".
title manoa, elemene, galuega '' Fa'aigoa fa'aigoa tau pe afai titlee le o iai le uiga. Afai e tu'uina atu se galuega, o le a vala'au ma lona thisfa'asinomaga seti i le elemene o lo'o fa'apipi'i i ai le popover.
trigger manoa 'hover focus' Fa'afefea ona fa'aosoina meafaigaluega: kiliki, fa'ae'e, taula'i, tusi lesona. E mafai ona e pasia le tele o fa'aoso; tuueseese ma se avanoa. 'manual'o lo'o fa'ailoa mai ai o le a fa'aosoina fa'apolokalame le fa'amatalaga meafaigaluega e ala i le .tooltip('show'), .tooltip('hide')ma .tooltip('toggle')metotia; e le mafai ona tu'ufa'atasia lenei tau ma so'o se isi fa'aoso. 'hover'na o ia lava o le a maua ai meafaigaluega e le mafai ona faʻaosoina e ala i le piano, ma e tatau ona faʻaaogaina pe afai o loʻo i ai isi auala mo le faʻasalalauina o faʻamatalaga tutusa mo tagata faʻaoga keyboard.

Fa'amatalaga uiga mo meafaigaluega ta'itasi

O filifiliga mo meafaigaluega ta'ito'atasi e mafai ona fa'amaonia e ala i le fa'aogaina o uiga fa'amaumauga, e pei ona fa'amatalaina i luga.

Fa'aaogaina galuega fa'atasi mapopperConfig

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

Metotia

Metotia ma suiga e le tutusa

O metotia API uma e le fetaui ma amata se suiga . Latou te toe fo'i atu i le tagata telefoni i le taimi lava e amata ai le suiga ae le'i uma . E le gata i lea, o le a le amanaʻiaina se auala e valaʻau ai i se vaega o suiga .

Va'ai la matou pepa JavaScript mo nisi fa'amatalaga .

Metotia Fa'amatalaga
disable Aveese le agava'a mo se mea faigaluega e fa'aalia. Fa'atoa mafai ona fa'aalia le mea faigaluega pe a toe fa'aagaina.
dispose Natia ma fa'aleagaina le mea faigaluega a le elemene (Ave'ese fa'amaumauga o lo'o teuina ile elemene DOM). Tooltips e fa'aogaina le tu'uina atu (lea e faia i le fa'aogaina o le selectorfilifiliga ) e le mafai ona fa'aumatia ta'ito'atasi i elemene fa'aoso tupuaga.
enable E tu'uina atu i se mea e fa'aoga meafaigaluega e mafai ona fa'aalia. E mafai ona fa'aogaina mea faigaluega.
getInstance Metotia static e mafai ai e oe ona maua le meafaigaluega faʻataʻitaʻiga e fesoʻotaʻi ma se elemene DOM, poʻo le fatuina o se mea fou i le tulaga e leʻi amataina.
getOrCreateInstance Metotia static e mafai ai e oe ona maua le meafaigaluega faʻataʻitaʻiga e fesoʻotaʻi ma se elemene DOM, poʻo le fatuina o se mea fou i le tulaga e leʻi amataina.
hide Natia le mea faigaluega o se elemene. Toe fo'i atu i le tagata vala'au a'o le'i natia le mea faigaluega (fa'atusa a'o le'i tupu le hidden.bs.tooltipmea na tupu). O lenei mea ua manatu o se "manual" faʻaosoina o le meafaigaluega.
setContent Tuuina atu se auala e sui ai le anotusi o meafaigaluega pe a uma ona amataina.
show Fa'aalia le mea faigaluega o se elemene. Toe fo'i atu i le tagata vala'au a'o le'i fa'aalia moni mai le mea faigaluega (fa'atusa a'o le'i tupu le shown.bs.tooltipmea na tupu). O lenei mea ua manatu o se "manual" faʻaosoina o le meafaigaluega. E le fa'aalia lava ni mea faigaluega e leai ni fa'ailoga umi.
toggle Su'e le pito meafaigaluega a se elemene. Toe fo'i i le tagata vala'au a'o le'i fa'aalia pe natia le mea faigaluega (fa'atusa a'o le'i tupu le shown.bs.tooltippo'o le hidden.bs.tooltipmea na tupu). O lenei mea ua manatu o se "manual" faʻaosoina o le meafaigaluega.
toggleEnabled Fa'afeso'ota'i le agava'a mo se mea faigaluega e fa'aalia pe natia.
update Fa'afou le tulaga o se mea faigaluega a le elemene.
const tooltip = bootstrap.Tooltip.getInstance('#example') // Returns a Bootstrap tooltip instance

// setContent example
tooltip.setContent({ '.tooltip-inner': 'another title' })
E setContenttalia e le metotia se objectfinauga, pe a fai o meatotino-ki ta'itasi o se stringtagata filifilia lelei i totonu o le popover template, ma o meatotino-taua taitasi e mafai ona string| element| function| null

Mea na tutupu

Mea na tupu Fa'amatalaga
hide.bs.tooltip O lenei mea na tupu e faʻamalo vave pe a hidevalaʻau le auala faʻataʻitaʻiga.
hidden.bs.tooltip O lenei mea e tupu pe a uma ona natia le popover mai le tagata faʻaoga (o le a faʻatali mo suiga CSS e maeʻa).
inserted.bs.tooltip O lenei mea na tupu e faʻamalo pe a maeʻa le show.bs.tooltipmea na tupu ina ua faʻaopoopo le faʻataʻitaʻiga meafaigaluega i le DOM.
show.bs.tooltip E mu vave lenei mea pe a showvalaʻau le auala faʻataʻitaʻiga.
shown.bs.tooltip O lenei mea e tupu pe a faʻaalia le popover i le tagata faʻaoga (o le a faʻatali mo suiga CSS e maeʻa).
const myTooltipEl = document.getElementById('myTooltip')
const tooltip = bootstrap.Tooltip.getOrCreateInstance(myTooltipEl)

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

tooltip.hide()