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 wanbootstrap.bundle.min.js
we 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.
prefers-reduced-motion
midia 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-toggle
atribyut, lɛk so:
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
Tultip dɛn na di link dɛn
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.
<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
ɔ
data-bs-title
insay yu HTML. We
title
dɛn yuz am, Popper go riples am ɔtomɛtik wan
data-bs-title
we dɛn rɛnd di ɛlimɛnt.
Kastɔm tultip dɛn
Dɛn ad am na v5.2.0Yu 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);
}
<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.0As 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 .tooltip
fɔ ɛ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: scroll
lɛk wi .table-responsive
, bɔt stil de kip di ɔrijinal plesmɛnt in pozishɔn. Fɔ sɔlv dis, sɛt di boundary
opshɔn (fɔ di flip modifya we de yuz di popperConfig
opshɔ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 data
atribyut ɛn title
na 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, top
di 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 hover
as 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 disabled
atribyut 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"
.
<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-config
we 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 title
valyu 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}'
.
sanitize
,
sanitizeFn
, ɛn
allowList
opshɔ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 title go rɛnd na di tultip. If na lay, innerText dɛ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 auto dɛ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 this kɔ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.on sɔ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 title go injɛkt insay di .tooltip-inner . .tooltip-arrow go bi di tultip in aro. Di ɔtamost wrap ɛlimɛnt fɔ gɛt di .tooltip klas ɛn role="tooltip" . |
title |
string, ɛlimɛnt, fɛnshɔn | '' |
Difɔlt taytul valyu if title atribyut nɔ de. If dɛn gi wan fɛnshɔn, dɛn go kɔl am wit in this rɛ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 .
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 selector opshɔ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.tooltip tin 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.tooltip ivin 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' })
setContent
we aw dɛn de du am de aksept wan
object
argumɛnt, usay ɛni prɔpati-ki na valid
string
sɛ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 hide dɛ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.tooltip ivent 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 show instans 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()