Skip to di men tin dɛn we de insay Skip to doks nevigishɔn
Check
in English

Tultip dɛn fɔ yuz

Dokumɛnt ɛn ɛgzampul fɔ ad kɔstɔm Bootstrap tultip dɛn wit CSS ɛn JavaSkript we de yuz CSS3 fɔ animashɔn ɛn data-bs-atribyut fɔ lokal taytul stɔrɔj.

Ɔvaviu fɔ di Baybul

Tin dɛn fɔ no we yu de yuz di tultip plɔgin:

  • Tultip dɛn de abop pan di tɔd pati laybri Popper fɔ pozishɔn. Yu fɔ put popper.min.js bifo bootstrap.js, ɔ yuz wan bootstrap.bundle.min.jswe gɛt Popper.
  • Tultip dɛn na opt-in fɔ pefɔmɛns rizin, so yu fɔ initialize dɛn yusɛf .
  • Tultip dɛn we gɛt taytul dɛn we nɔ gɛt ziro nɔ de ɛva sho.
  • Spɛsify container: 'body'fɔ avɔyd fɔ rɛnd prɔblɛm dɛn na mɔ kɔmpleks kɔmpɔnɛnt dɛn (lɛk wi input grup dɛn, bɔtin grup dɛn, ɛn ɔda wan dɛn).
  • Fɔ trig tultip dɛn pan ɛlimɛnt dɛn we ayd nɔ go wok.
  • Tultip fɔ .disabledɔ disabledɛlimɛnt dɛn fɔ trig pan wan wrap ɛlimɛnt.
  • We dɛn trig am frɔm haypa link dɛn we de span bɔku layn dɛn, tultip dɛn go de na di sɛnt. Yuz white-space: nowrap;pan yu <a>s fɔ avɔyd dis bihayvya.
  • Tultip dɛn fɔ ayd bifo dɛn dɔn pul dɛn kɔrɛspɔndɛns ɛlimɛnt dɛn na di DOM.
  • Tultips kin trig tanks to wan elemɛnt insay wan shado DOM.

Yu get ol dat? Gret, mek wi si aw dɛn de wok wit sɔm ɛgzampul dɛn.

Bay difɔlt, dis kɔmpɔnɛnt de yuz di kɔntinyu sanitiza we dɛn bil insay, we de pul ɛni HTML ɛlimɛnt dɛn we dɛn nɔ alaw klia wan. Si di say we se sanitiza na wi JavaSkript dɔkyumentri fɔ no mɔ.
Di animashɔn ifɛkt fɔ dis kɔmpɔnɛnt de dipen pan di prefers-reduced-motionmidia kwɛstyɔn. Si di ridyus muvmɛnt sɛkshɔn na wi aksesibiliti dɔkyumentri .

Ɛgzampul dɛn

Ɛnable tultip dɛn

As wi bin dɔn tɔk, yu fɔ bigin fɔ yuz di tultip dɛn bifo dɛn yuz dɛn. Wan we fɔ initialize ɔl di tultip dɛn na wan pej na fɔ pik dɛn bay dɛn data-bs-toggleatribyut, lɛk so:

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

Hova oba di link dɛn we de dɔŋ fɔ si tultip dɛn:

Pleshɔlda tɛks fɔ sho sɔm inlayn link dɛn wit tultip dɛn. Dis na naw jos filler, no kil. Kɔntinɛnt we dɛn put ya jɔs fɔ falamakata di prɛzɛns fɔ rial tɛks . Ɛn ɔl dat jɔs fɔ gi yu wan aidia bɔt aw tultip dɛn go luk we dɛn yuz dɛn na rial wɔl sityueshɔn dɛn. So wi op se yu dɔn si naw aw dɛn tultip dɛn ya na link dɛn kin wok na prɔsis, wans yu yuz dɛn na yu yon sayt ɔ prɔjek.

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>
Fil fri fɔ yuz ɛni wan pan dɛn titleɔ data-bs-titleinsay yu HTML. We titledɛn yuz am, Popper go riples am ɔtomɛtik wan data-bs-titlewe dɛn rɛnd di ɛlimɛnt.

Kastɔm ​​tultip dɛn

Dɛn ad am na v5.2.0

Yu kin kɔstɔmayz di apinɛns fɔ tultip dɛn yuz CSS vɛriɔbul dɛn . Wi sɛt wan kɔstɔm klas wit data-bs-custom-class="custom-tooltip"fɔ skɔp wi kɔstɔm apinɛns ɛn yuz am fɔ ɔvalayz wan lokal CSS vɛriɔbul.

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

Aw fɔ sho aw fɔ du am

Hova oba di bɔtin dɛn we de dɔŋ fɔ si di 4 tultip dɛn dairekshɔn dɛn: ɔp, rayt, dɔŋ, ɛn lɛft. Dairekshɔn dɛn de mirɔ we yu de yuz Bootstrap na 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>

Ɛn wit kɔstɔm HTML we dɛn ad:

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

Wit wan SVG:

CSS we dɛn kɔl CSS

Di tin dɛn we kin chenj

Dɛn ad am na v5.2.0

As pat pan Bootstrap in evolvin CSS vɛriɔbul dɛn aprɔch, tultip dɛn naw de yuz lokal CSS vɛriɔbul dɛn on .tooltipfɔ ɛnhans rial-taym kɔstɔmayshɔn. Valyu fɔ di CSS vɛriɔbul dɛn de sɛt via Sass, so Sass kɔstɔmayshɔn stil de sɔpɔt, bak.

  --#{$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 di vayriɔbul dɛn

$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

Aw fɔ yuz am

Di tultip plɔgin de jenarayz kɔntinyu ɛn mak pan dimand, ɛn bay difɔlt de put tultip dɛn afta dɛn trig ɛlimɛnt.

Trig di tultip bay JavaSkript:

const exampleEl = document.getElementById('example')
const tooltip = new bootstrap.Tooltip(exampleEl, options)
Ovaflɔ autoɛnscroll

Tultip pozishɔn de tray fɔ chenj ɔtomɛtik wans wan mama ɛn papa kɔntena gɛt overflow: autoɔ overflow: scrolllɛk wi .table-responsive, bɔt stil de kip di ɔrijinal plesmɛnt in pozishɔn. Fɔ sɔlv dis, sɛt di boundaryopshɔn (fɔ di flip modifya we de yuz di popperConfigopshɔn) to ɛni HTMLElement fɔ ɔvalayz di difɔlt valyu, 'clippingParents', lɛk document.body:

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

Mak-ap fɔ di tin dɛn we de apin

Di mak we yu nid fɔ wan tultip na jɔs wan dataatribyut ɛn titlena di HTML ɛlimɛnt yu want fɔ gɛt tultip. Di mak we dɛn dɔn mek fɔ wan tultip rili simpul, pan ɔl we i nid fɔ gɛt pozishɔn (bay difɔlt, topdi plɔgin sɛt to).

Mek tultip dɛn wok fɔ di wan dɛn we de yuz kibɔd ɛn ɛp tɛknɔlɔji

Yu fɔ jɔs ad tultip dɛn to HTML ɛlimɛnt dɛn we tradishɔnal wan we dɛn kin yuz fɔ pe atɛnshɔn pan kibɔd ɛn we kin wok wit ɔda pipul dɛn (lɛk link ɔ fɔm kɔntrol). Pan ɔl we dɛn kin mek arbitri HTML ɛlimɛnt dɛn (lɛk <span>s) fɔs bay we dɛn ad di tabindex="0"atribyut, dis go ad tab stɔp dɛn we kin anɔynt ɛn kɔnfyus pan ɛlimɛnt dɛn we nɔ de intaraktiv fɔ di wan dɛn we de yuz di kibɔd, ɛn bɔku pan di ɛtɛknɔlɔji dɛn we de ɛp pipul dɛn naw nɔ de anɔys di tultip na dis sityueshɔn. Apat frɔm dat, nɔ jɔs abop pan hoveras di trig fɔ yu tultip, bikɔs dis go mek yu tultip dɛn nɔ pɔsibul fɔ trig fɔ di wan dɛn we de yuz di kibɔd.

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

Di ɛlimɛnt dɛn we nɔ ebul fɔ wok

Elemɛnt dɛn wit di disabledatribyut nɔ de intaraktiv, we min se yuzman dɛn nɔ kin ebul fɔ fos, hova, ɔ klik dɛn fɔ trig wan tultip (ɔ popover). As wokarawnd, yu go want fɔ trig di tultip frɔm wan wrapa <div>ɔ <span>, we fayn fɔ mek yu yuz 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>

Di tin dɛn we yu kin pik fɔ du

As opshɔn dɛn kin pas bay data atribyut ɔ JavaSkript, yu kin ad opshɔn nem to data-bs-, lɛk insay data-bs-animation="{value}". Mek shɔ se yu chenj di kes tayp fɔ di opshɔn nem frɔm “ camelCase ” to “ kebab-case ” we yu de pas di opshɔn dɛn tru data atribyut dɛn. Fɔ ɛgzampul, yuz data-bs-custom-class="beautifier"insted fɔ data-bs-customClass="beautifier".

As fɔ Bootstrap 5.2.0, ɔl di kɔmpɔnɛnt dɛn de sɔpɔt wan ɛkspirimɛnt rizɔv data atribyut data-bs-configwe kin os simpul kɔmpɔnɛnt kɔnfigyushɔn as JSON string. We wan ɛlimɛnt gɛt data-bs-config='{"delay":0, "title":123}'ɛn data-bs-title="456"atribyut, di fayn titlevalyu go bi 456ɛn di sɛpret data atribyut dɛn go ɔvalayz valyu dɛn we dɛn gi pan data-bs-config. Apat frɔm dat, di data atribyut dɛn we de naw ebul fɔ gɛt JSON valyu dɛn lɛk data-bs-delay='{"show":0,"hide":150}'.

Notis se fɔ sikyɔriti rizin dɛn nɔ go ebul fɔ gi di sanitize, sanitizeFn, ɛn allowListopshɔn dɛn we yu de yuz di data atribyut dɛn.
Nem Kayn Balans Tɔk bɔt
allowList tin Difɔlt valyu Objek we gɛt atribyut ɛn tag dɛn we dɛn alaw.
animation boolean we dɛn kɔl true Aplay wan CSS fade transishɔn to di tultip.
boundary string, ɛlimɛnt 'clippingParents' Ovaflɔ kɔnstrakshɔn bɔda fɔ di tultip (i de aplay nɔmɔ to Popper in preventOverflow modifya). Bay difɔlt, i de 'clippingParents'ɛn kin aksept wan HTMLElement rɛfrɛns (via JavaSkript nɔmɔ). Fɔ no mɔ, luk na Popper’s detectOverflow docs .
container string, ɛlimɛnt, lay lay tin dɛn false Apɛnd di tultip to wan patikyula ɛlimɛnt. Fɔ ɛgzampul: container: 'body'. Dis opshɔn rili yusful bikɔs i de alaw yu fɔ posishun di tultip na di flɔ na di dɔkyumɛnt nia di trig ɛlimɛnt - we go mek di tultip nɔ flɔt away frɔm di trig ɛlimɛnt we yu de risayz di winda.
customClass string, fɔ wok '' Ad klas dɛn to di tultip we dɛn sho am. Notis se dɛn go ad dɛn klas ya apat frɔm ɛni klas we dɛn dɔn sho na di tɛmplat. Fɔ ad bɔku klas dɛn, separet dɛn wit spɛshal say dɛn: 'class-1 class-2'. Yu kin pas wan fɛnshɔn bak we fɔ ritɔn wan string we gɛt ɔda klas nem dɛn.
delay nɔmba, sɔntin 0 Dilay fɔ sho ɛn ayd di tultip (ms)—nɔ de aplay to manual trigger type. If dɛn gi wan nɔmba, dɛn kin delay fɔ ɔl tu di ayd/sho. Di we aw dɛn mek di tin dɛn na: delay: { "show": 500, "hide": 100 }.
fallbackPlacements arenjmɛnt fɔ di wan dɛn we de ['top', 'right', 'bottom', 'left'] Difayn fɔlbak plesmɛnt dɛn bay we yu gi wan list fɔ plesmɛnt dɛn na arenjmɛnt (in ɔda we aw dɛn lɛk). Fɔ no mɔ, luk na Popper’s behavior docs .
html boolean we dɛn kɔl false Alaw HTML na di tultip. If na tru, HTML tag dɛn na di tultip’s titlego rɛnd na di tultip. If na lay, innerTextdɛn go yuz prɔpati fɔ put kɔntinyu insay di DOM. Yuz tɛks if yu de wɔri bɔt XSS atak dɛn.
offset arenjmɛnt, string, fɛnshɔn [0, 0] Ɔfset fɔ di tultip rilitiv to in target. Yu kin pas wan string insay data atribyut dɛn wit kɔma separet valyu dɛn lɛk: data-bs-offset="10,20". We dɛn yuz wan fɛnshɔn fɔ no di ɔfset, dɛn kin kɔl am wit wan ɔbjɛkt we gɛt di pɔpa plesmɛnt, di rɛfrɛns, ɛn di pɔpa rɛkt dɛn as in fɔs argumɛnt. Di trigεrin εlimεnt DOM node de pas as di sɛkɔn argumɛnt. Di fɛnshɔn fɔ ritɔn wan arenjmɛnt wit tu nɔmba dɛn: skidding , distans . Fɔ no mɔ, luk na Popper’s offset docs .
placement string, fɔ wok 'top' Aw fɔ posishun di tultip: ɔto, ɔp, dɔŋ, lɛft, rayt. We autodɛn spɛsifa am, i go dinamik wan rioriɛnt di tultip. We dɛn yuz wan fɛnshɔn fɔ no di plesmɛnt, dɛn kin kɔl am wit di tultip DOM node as in fɔs argumɛnt ɛn di trigɛn ɛlimɛnt DOM node as in sɛkɔn. Di thiskɔntɛks de sɛt to di tultip instans.
popperConfig nul, ɔbjɛkt, fɛnshɔn null Fɔ chenj Bootstrap in difɔlt Popper kɔnfigyushɔn, si Popper in kɔnfigyushɔn . We dɛn yuz wan fɛnshɔn fɔ mek di Popper kɔnfigyushɔn, dɛn kin kɔl am wit wan ɔbjɛkt we gɛt di Bootstrap in difɔlt Popper kɔnfigyushɔn. I de ɛp yu fɔ yuz ɛn jɔyn di difɔlt wit yu yon kɔnfigyushɔn. Di fɛnshɔn fɔ ritɔn wan kɔnfigyushɔn ɔbjɛkt fɔ Popa.
sanitize boolean we dɛn kɔl true Enable ɔ disable di sanitayzeshɔn. If activated 'template', 'content'ɛn 'title'opshɔn dɛn go sanitayz.
sanitizeFn nul, fɔ wok null Na ya yu kin saplae yu own sanitize function. Dis kin fayn if yu lɛk fɔ yuz laybri we dɛn dɔn gi yu fɔ du sanitayzeshɔn.
selector string, lay lay tɔk false If dɛn gi wan sɛlɛktɔ, dɛn go gi tultip ɔbjɛkt dɛn to di target dɛn we dɛn dɔn spɛsifa. In prɔsis, dɛn kin yuz dis fɔ yuz tultip dɛn bak to dinamik ad DOM ɛlimɛnt dɛn ( jQuery.onsɔpɔt). Si dis magazin ɛn wan ɛgzampul we gɛt bɔku tin dɛn fɔ no bɔt .
template rop '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' Base HTML fɔ yuz we yu de mek di tultip. Di tultip dɛn titlego injɛkt insay di .tooltip-inner. .tooltip-arrowgo bi di tultip in aro. Di ɔtamost wrap ɛlimɛnt fɔ gɛt di .tooltipklas ɛn role="tooltip".
title string, ɛlimɛnt, fɛnshɔn '' Difɔlt taytul valyu if titleatribyut nɔ de. If dɛn gi wan fɛnshɔn, dɛn go kɔl am wit in thisrɛfrɛns sɛt to di ɛlimɛnt we di popover ataya to.
trigger rop 'hover focus' Aw dɛn kin trig di tultip: klik, hova, fɔs, manual. Yu kin pas bɔku trig dɛn; separet dɛn wit wan ples. 'manual'sho se di tultip go trig programmatik wan via di .tooltip('show'), .tooltip('hide')ɛn .tooltip('toggle')di we dɛn; dis valyu nɔ kin kam togɛda wit ɛni ɔda trig. 'hover'pan insɛf go mek dɛn gɛt tultip dɛn we dɛn nɔ go ebul fɔ trig bay di kibɔd, ɛn dɛn fɔ jɔs yuz am if ɔda we dɛn de fɔ gi di sem infɔmeshɔn to di wan dɛn we de yuz di kibɔd de.

Data atribyut fɔ wan wan tultip dɛn

Opshɔn fɔ wan wan tultip dɛn kin ɔda we fɔ spɛsifa tru di yus fɔ data atribyut dɛn, lɛk aw dɛn ɛksplen am ɔp.

Yuz funkshɔn witpopperConfig

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

Di we aw dɛn de du am

Asynchronous mεtכd dεm εn transishכn dεm

Ɔl di API mɛtɔd dɛn na asynchronous ɛn dɛn kin stat wan transishɔn . Dɛn kin go bak to di pɔsin we kɔl am jɔs lɛk aw dɛn bigin fɔ chenj bɔt bifo i dɔn . Apat frɔm dat, dɛn go ignore wan mɛtɔd kɔl pan wan transishɔn kɔmpɔnɛnt .

Si wi JavaSkript dɔkyumentri fɔ no mɔ .

We Tɔk bɔt
disable Rimov di abiliti fɔ wan ɛlimɛnt in tultip fɔ sho. Di tultip go jɔs ebul fɔ sho if dɛn dɔn ɛnabul am bak.
dispose Ayd ɛn pwɛl wan ɛlimɛnt in tultip (Rimov di data we dɛn dɔn kip na di DOM ɛlimɛnt). Tultip dɛn we de yuz delegɛshɔn (we dɛn mek yuz di selectoropshɔn ) nɔ kin ebul fɔ pwɛl wan wan pan disɛndant trig ɛlimɛnt dɛn.
enable Gi wan elemɛnt in tultip di abiliti fɔ sho. Tultip dɛn de ɛnabul bay difɔlt.
getInstance Statik we de alaw yu fɔ gɛt di tultip instans we gɛt fɔ du wit wan DOM ɛlimɛnt, ɔ mek wan nyu wan if i nɔ bin initialize.
getOrCreateInstance Statik we de alaw yu fɔ gɛt di tultip instans we gɛt fɔ du wit wan DOM ɛlimɛnt, ɔ mek wan nyu wan if i nɔ bin initialize.
hide Ayd wan ɛlimɛnt in tultip. Ritɔn to di pɔsin we kɔl bifo di tultip dɔn rili ayd (dat na bifo di hidden.bs.tooltiptin apin). Dɛn kin tek dis as “manual” we de trig di tultip.
setContent Gi wan we fɔ chenj di tin dɛn we de insay di tultip afta dɛn dɔn bigin fɔ yuz am.
show Rivɛl wan ɛlimɛnt in tultip. Ritɔn to di pɔsin we kɔl bifo dɛn rili sho di tultip (dat na bifo di...shown.bs.tooltip tin apin). Dɛn kin tek dis as “manual” we de trig di tultip. Tultip dɛn we gɛt taytul dɛn we nɔ gɛt ziro nɔ de ɛva sho.
toggle Toggles wan element in tultip. Ritɔn to di pɔsin we kɔl bifo dɛn rili sho ɔ ayd di tultip (dat na bifo di shown.bs.tooltipɔ hidden.bs.tooltipivin apin). Dɛn kin tek dis as “manual” we de trig di tultip.
toggleEnabled Toggles di abiliti fɔ wan elemɛnt in tultip fɔ sho ɔ ayd.
update Ɔpdet di pozishɔn fɔ wan ɛlimɛnt in tultip.
const tooltip = bootstrap.Tooltip.getInstance('#example') // Returns a Bootstrap tooltip instance

// setContent example
tooltip.setContent({ '.tooltip-inner': 'another title' })
Di setContentwe aw dɛn de du am de aksept wan objectargumɛnt, usay ɛni prɔpati-ki na valid stringsɛlɛktɔ insay di popover tɛmplat, ɛn ɛni prɔpati-valyu we gɛt fɔ du wit am kin bi string| element| function| null

Di tin dɛn we kin apin

Program Tɔk bɔt
hide.bs.tooltip Dis ivent de faya wantɛm wantɛm we hidedɛn dɔn kɔl di instans mɛtɔd.
hidden.bs.tooltip Dis ivent de faya we di popover dɔn dɔn fɔ ayd frɔm di yuza (go wet fɔ CSS transishɔn dɛn fɔ dɔn).
inserted.bs.tooltip Dis ivent de faya afta di show.bs.tooltipivent we dɛn dɔn ad di tultip tɛmplat to di DOM.
show.bs.tooltip Dis ivent de faya wantɛm wantɛm we dɛn kɔl di showinstans mɛtɔd.
shown.bs.tooltip Dis ivent de faya we di popover dɔn mek visible to di yuza (go wet fɔ CSS transishɔn fɔ dɔn).
const myTooltipEl = document.getElementById('myTooltip')
const tooltip = bootstrap.Tooltip.getOrCreateInstance(myTooltipEl)

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

tooltip.hide()