U gudub nuxurka muhiimka ah U gudub dukumentiyada navigation
Check
in English

Popovers

Dukumeenti iyo tusaalooyin lagu daro Bootstrap popovers, sida kuwa laga helo iOS, shay kasta oo ku yaal boggaaga.

Dulmar

Waxyaabaha ay tahay in la ogaado marka la isticmaalayo popover plugin:

  • Popovers 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 ka bootstrap.bundle.min.jskooban Popper.
  • Popovers waxay u baahan yihiin plugin popover ah sida ku tiirsanaanta.
  • Popovers waxay u soo galeen sababo waxqabad dartood, marka waa inaad adigu bilawdaa .
  • Dhererka eber titleiyo contentqiyamku weligood ma muujin doonaan popover.
  • Qeex container: 'body'si aad uga fogaato soo jeedinta dhibaatooyinka qaybo badan oo kakan (sida kooxahayada wax gelinta, kooxaha badhanka, iwm).
  • Kicinta popovers ee walxaha qarsoon ma shaqayn doono.
  • Popovers .disabledama disabledcuriyayaasha waa in lagu kiciyo curiyaha duubka ah.
  • Marka uu ka kiciyo barroosinno isku duuban dhowr xariiq, popovers waxay dhexda u ahaan doonaan ballaca guud ee barroosinnada. Isticmaal s si .text-nowrapaad <a>uga fogaato dhaqankan.
  • Rabshadaha waa in la qariyaa ka hor inta aan laga saarin walxaha u dhigma ee DOM.
  • Popovers waa la kicin karaa iyada oo ay ugu wacan tahay shay ku jira hadhka DOM.
Sida caadiga ah, qaybtani waxay isticmaashaa nadiifiyaha ku dhex jira, kaas oo ka saara wax kasta oo HTML ah oo aan si cad loo ogolayn. Faahfaahin dheeraad ah ka eeg qaybta fayadhowrka ee dukumeentiyada JavaScript .
Saamaynta animation ee qaybtani waxay ku xidhan tahay prefers-reduced-motionwaydiinta warbaahinta. Eeg qaybta dhaqdhaqaaqa la dhimay ee dukumeenti gelitaankeena .

Sii wad akhri si aad u aragto sida popovers ula shaqeeyaan tusaalooyinka qaarkood.

Tusaalooyinka

Daar popovers

Sida kor ku xusan, waa inaad bilowdaa popovers ka hor inta aan la isticmaalin. Hal dariiqo oo lagu bilaabi karo dhammaan popovers bogga waxay noqon kartaa in lagu xusho data-bs-togglesifadooda, sida:

const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))

Muujinta tooska ah

Waxaan isticmaalnaa JavaScript la mid ah jeex-jeexa sare si aan u soo bandhigno popover-ka soo socda. Ciwaanka waxa loo dajiyay iyada data-bs-titleoo waxa jidhka ku jirana lagu dejiyay data-bs-content.

Dareen xor inaad ku isticmaasho HTML-gaaga midkood titleama midkood. data-bs-titleMarka titlela isticmaalo, Popper wuxuu si toos ah ugu beddeli doonaa data-bs-titlemarka curiyaha la sameeyo.
html
<button type="button" class="btn btn-lg btn-danger" data-bs-toggle="popover" data-bs-title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>

Afar jiho

Afar doorasho ayaa diyaar ah: sare, midig, hoose, iyo bidix. Tilmaamaha waa la milicsadaa marka la isticmaalayo Bootstrap gudaha RTL. U deji data-bs-placementsi aad u bedesho jihada

html
<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="top" data-bs-content="Top popover">
  Popover on top
</button>
<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="right" data-bs-content="Right popover">
  Popover on right
</button>
<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="bottom" data-bs-content="Bottom popover">
  Popover on bottom
</button>
<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="left" data-bs-content="Left popover">
  Popover on left
</button>

Caadiyancontainer

Markaad haysatid qaabab qaar oo ah walxaha waalidka ee farageliya popover, waxaad u baahan doontaa inaad qeexdo caado containersi HTML popover's uu uga dhex muuqdo qaybtaas. Tani waxay ku badan tahay miisaska ka jawaaba, kooxaha wax gelinta, iyo wixii la mid ah.

const popover = new bootstrap.Popover('.example-popover', {
  container: 'body'
})

Xaalad kale oo aad rabto inaad dejiso caado cad containerayaa ah popovers gudaha wada hadal modal , si aad u hubiso in popover laftiisa uu ku lifaaqan yahay habka. Tani waxay si gaar ah muhiim ugu tahay popovers oo ay ku jiraan walxo is-dhexgal ah - modal dialogs ayaa dabin doona diiradda, markaa ilaa popoverku aanu ahayn cunsurka habka, isticmaalayaashu ma awoodi doonaan inay diiradda saaraan ama dhaqaajiyaan walxahan is-dhexgalka.

const popover = new bootstrap.Popover('.example-popover', {
  container: '.modal-body'
})

popovers Custom

Lagu daray v5.2.0

Waxaad ku habeyn kartaa muuqaalka popovers adigoo isticmaalaya doorsoomayaasha CSS . Waxaan dejinay fasal gaar ah data-bs-custom-class="custom-popover"si aan u cabbirno muuqaalkayaga caadada ah oo aan u isticmaalno si aan uga gudubno doorsoomayaasha CSS ee maxalliga ah.

.custom-popover {
  --bs-popover-max-width: 200px;
  --bs-popover-border-color: var(--bs-primary);
  --bs-popover-header-bg: var(--bs-primary);
  --bs-popover-header-color: var(--bs-white);
  --bs-popover-body-padding-x: 1rem;
  --bs-popover-body-padding-y: .5rem;
}
html
<button type="button" class="btn btn-secondary"
        data-bs-toggle="popover" data-bs-placement="right"
        data-bs-custom-class="custom-popover"
        data-bs-title="Custom popover"
        data-bs-content="This popover is themed via CSS variables.">
  Custom popover
</button>

Ka saar marka xigta guji

Isticmaal focuskiciyeyaasha si aad u tirtirto popovers ee isticmaalaha gujinta xigta ee shay ka duwan curiyaha beddelka.

Calaamadayn gaar ah ayaa loo baahan yahay si loo joojiyo-ku-xigta-guji

Si aad u hesho hab-dhaqan iskutallaab ah oo ku habboon iyo hab-dhaqan-madal-madal ah, waa inaad isticmaashaa <a>summada, maaha summada , <button>sidoo kale waa inaad ku dartaa tabindexsifo.

html
<a tabindex="0" class="btn btn-lg btn-danger" role="button" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Dismissible popover" data-bs-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
const popover = new bootstrap.Popover('.popover-dismiss', {
  trigger: 'focus'
})

Curiyayaasha naafada

Qaybaha sifada leh disabledma aha kuwo is dhexgal ah, taasoo la micno ah in isticmaalayaashu aanay kor u qaadi karin ama aanay gujin karin si ay u kiciyaan popover (ama qalab). Xakameyn ahaan, waxaad u baahan doontaa inaad ka kiciso popover ka duubabka <div>ama <span>, sida habboon loo sameeyay kiiboodhka diiradda saaraya iyadoo la adeegsanayo tabindex="0".

Kiciyeyaasha popover naafada, waxa kale oo aad doorbidi kartaa data-bs-trigger="hover focus"si popover-ku ugu muuqdo jawaab celin muuqaal degdeg ah isticmaalayaashaada maadaama laga yaabo in aanay filanayn inay gujiyaan shay naafada ah.

html
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="Disabled popover">
  <button class="btn btn-primary" type="button" disabled>Disabled button</button>
</span>

CSS

Kala duwanaansho

Lagu daray v5.2.0

Iyada oo qayb ka ah habka isbeddelaya ee Bootstrap ee CSS, popovers hadda waxay isticmaalaan doorsoomayaasha CSS ee maxalliga ah .popoversi loo hagaajiyo habeynta waqtiga-dhabta ah. Qiimaha doorsoomayaasha CSS waxa lagu dejiyay Sass, sidaa darteed habaynta Sass wali waa la taageerayaa, sidoo kale.

  --#{$prefix}popover-zindex: #{$zindex-popover};
  --#{$prefix}popover-max-width: #{$popover-max-width};
  @include rfs($popover-font-size, --#{$prefix}popover-font-size);
  --#{$prefix}popover-bg: #{$popover-bg};
  --#{$prefix}popover-border-width: #{$popover-border-width};
  --#{$prefix}popover-border-color: #{$popover-border-color};
  --#{$prefix}popover-border-radius: #{$popover-border-radius};
  --#{$prefix}popover-inner-border-radius: #{$popover-inner-border-radius};
  --#{$prefix}popover-box-shadow: #{$popover-box-shadow};
  --#{$prefix}popover-header-padding-x: #{$popover-header-padding-x};
  --#{$prefix}popover-header-padding-y: #{$popover-header-padding-y};
  @include rfs($popover-header-font-size, --#{$prefix}popover-header-font-size);
  --#{$prefix}popover-header-color: #{$popover-header-color};
  --#{$prefix}popover-header-bg: #{$popover-header-bg};
  --#{$prefix}popover-body-padding-x: #{$popover-body-padding-x};
  --#{$prefix}popover-body-padding-y: #{$popover-body-padding-y};
  --#{$prefix}popover-body-color: #{$popover-body-color};
  --#{$prefix}popover-arrow-width: #{$popover-arrow-width};
  --#{$prefix}popover-arrow-height: #{$popover-arrow-height};
  --#{$prefix}popover-arrow-border: var(--#{$prefix}popover-border-color);
  

Doorsoomayaasha Sass

$popover-font-size:                 $font-size-sm;
$popover-bg:                        $white;
$popover-max-width:                 276px;
$popover-border-width:              $border-width;
$popover-border-color:              var(--#{$prefix}border-color-translucent);
$popover-border-radius:             $border-radius-lg;
$popover-inner-border-radius:       subtract($popover-border-radius, $popover-border-width);
$popover-box-shadow:                $box-shadow;

$popover-header-font-size:          $font-size-base;
$popover-header-bg:                 shade-color($popover-bg, 6%);
$popover-header-color:              $headings-color;
$popover-header-padding-y:          .5rem;
$popover-header-padding-x:          $spacer;

$popover-body-color:                $body-color;
$popover-body-padding-y:            $spacer;
$popover-body-padding-x:            $spacer;

$popover-arrow-width:               1rem;
$popover-arrow-height:              .5rem;

Isticmaalka

U oggolow popovers iyada oo loo marayo JavaScript:

const exampleEl = document.getElementById('example')
const popover = new bootstrap.Popover(exampleEl, options)

Samaynta popovers u shaqeyso kiiboodhka iyo isticmaalayaasha tignoolajiyada caawiya

Si loogu oggolaado isticmaaleyaasha kiiboodhka inay dhaqaajiyaan popovers-kaaga, waa inaad ku dartaa oo keliya curiyeyaasha HTML kuwaas oo dhaqan ahaan kiiboodhka diirada saaraya iyo is dhexgal (sida isku xidhka ama kontaroolada foomka). In kasta oo walxaha HTML-ka ah (sida <span>s) laga dhigi karo mid diiradda lagu saari karo iyadoo lagu darayo sifada tabindex="0", tani waxay ku dari doontaa joogsi laga yaabo inay dhibsato iyo jahawareer ku sameyso walxaha aan is dhex galka lahayn ee isticmaalayaasha kiiboodhka, iyo teknoolojiyadda caawinta badankoodu hadda kuma dhawaaqaan nuxurka popover ee xaaladdan. . Intaa waxaa dheer, ha isku hallayn oo kaliya hoverinay tahay kicinta popovers-kaaga, sababtoo ah tani waxay ka dhigaysaa kuwo aan suurtagal ahayn inay kiciyaan isticmaalayaasha kiiboodhka.

Inta aad geli karto hodan, habaysan HTML ee popovers oo leh htmlikhtiyaarka, waxaan si adag kuugula talineynaa inaad iska ilaaliso inaad ku darto qadar xad dhaaf ah oo ka kooban. Habka popovers hadda u shaqeeyaan waa in, marka la soo bandhigo, nuxurkoodu wuxuu ku xiran yahay curiyaha kiciya ee leh aria-describedbysifo. Natiijadu waxay tahay, dhammaan waxa ku jira popover-ka waxa lagu dhawaaqi doonaa isticmaalayaasha tignoolajiyada caawiya sidii hal socod dheer oo aan kala go' lahayn.

Intaa waxaa dheer, iyadoo ay suurtagal tahay in sidoo kale lagu daro kontaroolada is-dhexgalka (sida walxaha qaabka ama isku xidhka) popoverkaaga (adigoo ku daraya walxahan allowListsifooyinka iyo calaamadaha la oggol yahay), ogow in wakhtigan popoverku aanu maamulin habka diiradda saarista kiiboodhka. Marka isticmaalaha kiiboodhka uu furo popover, diiradda ayaa hadhi doonta curiyaha kicinaya, iyo sida popover-ku inta badan aanu isla markiiba raacin kicinta ku jirta qaab dhismeedka dukumeentiga, ma jirto dammaanad qaadka in horay loo socdo/cadaadisTABwuxuu u guuri doonaa isticmaalaha kiiboodhka gudaha popover laftiisa. Marka la soo koobo, si fudud ku darida kontaroolada isdhexgalka ee popover waxay u badan tahay inay ka dhigto kontarooladan mid aan la heli karin/aan la isticmaali karin isticmaalayaasha kiiboodhka iyo isticmaalayaasha tignoolajiyada caawinta, ama ugu yaraan samaynta nidaamka guud ee diirada aan macquul ahayn. Xaaladahan, ka fiirso inaad isticmaasho qaab wada hadal ah.

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, titleqiimaha kama dambaysta ahi waxa uu ahaan doonaa 456sifada 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}'.

Ogsoonow in sababo ammaan dartood sanitize, sanitizeFn, iyo allowListikhtiyaarrada 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 popover.
boundary xadhig, element 'clippingParents' Xadka xad-dhaafka xad-dhaafka ah ee soohdinta popover (waxay khusaysaa oo keliya 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 Ku dhejinta popover-ka shay gaar ah. Tusaale container: 'body':. Doorashadani waxay si gaar ah faa'iido u leedahay inay kuu ogolaato inaad ku dhejiso qulqulka qulqulka dukumeentiga u dhow curiyaha kiciya - kaas oo ka ilaalin doona popover inuu ka sababbeeyo walxaha kiciya inta lagu jiro cabbirka daaqada.
content xadhig, element, function '' Qiimaha nuxurka asalka ah haddii data-bs-contentsifadu aanay jirin. Haddii shaqo la bixiyo, waxa loo yeedhi doonaa iyada oo thistixraaceeda loo dejiyey curiyaha popover-ku ku dheggan yahay.
customClass xadhig, function '' Casharo ku dar popover marka la muujiyo. 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 Daahinta muujinta iyo qarinta popover-ka (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 xadhig, habayn ['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 gudaha popover. Haddi ay run tahay, HTML tags ee popover's-ka titlewaxa lagu samayn doonaa popover-ka. Haddii ay been tahay, innerTexthantida waxaa loo isticmaali doonaa in lagu geliyo DOM. Isticmaal qoraal haddii aad ka welwelsan tahay weerarrada XSS.
offset nambar, xadhig, shaqo [0, 0] Deminta popover marka loo eego bartilmaameedka. 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 popover: auto, sare, hoose, bidix, midig. Marka autola cayimo, waxay si firfircoon dib u habayn doontaa popover-ka. Marka hawl loo isticmaalo si loo go'aamiyo meelaynta, waxaa lagu magacaabaa node popover DOM oo ah dooddeeda kowaad iyo curiyaha DOM node oo ah kan labaad. Macnaha thisguud waxa loo dejiyay tusaale popover.
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 doorasho la bixiyo, shayada soo-bandhigista waxa loo igmaday bartilmaameedyada la cayimay. Ficil ahaan, tan waxaa sidoo kale loo isticmaalaa in lagu dabaqo popovers si firfircoon loogu daray walxaha DOM ( jQuery.ontaageerada). Bal u fiirso arrintan iyo tusaale wargelin ah .
template xadhig '<div class="popover" role="popover"><div class="popover-arrow"></div><div class="popover-inner"></div></div>' HTML saldhig si loo isticmaalo marka la abuurayo popover. Popover's titleayaa lagu duri doonaa .popover-inner. .popover-arrowwaxay noqon doontaa fallaadha popover. Cutubka duubka ugu dambeeya waa inuu lahaadaa .popoverfasalka iyo role="popover".
title xadhig, element, function '' Qiimaha cinwaanka caadiga ah haddii titlesifadu aanay jirin. Haddii shaqo la bixiyo, waxa loo yeedhi doonaa iyada oo thistixraaceeda loo dejiyey curiyaha popover-ku ku dheggan yahay.
trigger xadhig 'hover focus' Sida popover u kiciyo: guji, duleelka, diiradda, buug-gacmeedka. Waxaad ka gudbi kartaa kiciyeyaasha badan; kala saar meel bannaan. 'manual'waxay muujinaysaa in popover-ka lagu kicin doono barnaamij ahaan iyada oo loo marayo .popover('show'), .popover('hide')iyo .popover('toggle')hababka; Qiimahan laguma dari karo kiciye kale. 'hover'Kaligiis waxa ay keenaysaa kor u kac aan la kicin karin iyada oo la adeegsanayo kiiboodhka, waana in la isticmaalo oo kaliya haddii habab kale oo lagu gudbinayo isla macluumaadka isticmaalayaasha kiiboodhka ay jiraan.

Sifooyinka xogta ee popovers shaqsi

Ikhtiyaarada popovers shakhsi ahaan waxaa lagu qeexi karaa iyada oo la isticmaalayo sifooyin xogta, sida kor lagu sharaxay.

Isticmaalka shaqada lehpopperConfig

const popover = new bootstrap.Popover(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 soo-bandhigidda curiyaha si loo muujiyo. Booqashada ayaa la tusi karaa oo keliya haddii dib loo hawlgeliyo.
dispose Wuxuu qariyaa oo baabi'iyaa boodboodka cunsurka (Waxay meesha ka saartaa xogta kaydsan ee cunsurka DOM). Popovers isticmaala ergada (kuwaas oo la abuuray iyadoo la isticmaalayo ikhtiyaarka selector) si gaar ah looma baabi'in karo walxaha kiciya faraca.
enable Siinaya popover element awood lagu muujiyo. Popovers waa la dajiyay si toos ah.
getInstance Habka taagan kaas oo kuu ogolaanaya inaad hesho tusaalaha popover ee la xidhiidha curiyaha DOM.
getOrCreateInstance Habka taagan kaas oo kuu ogolaanaya inaad hesho tusaale popover ee la xidhiidha curiyaha DOM, ama abuurto mid cusub haddii aan la bilaabin.
hide Wuxuu qariyaa boodboodka curiyaha. Ku soo noqoshada soo wacaha ka hor inta aan bood-boodka dhab ahaantii la qarin (ie ka hor intaanay hidden.bs.popoverdhacdada dhicin). Tan waxa loo tixgalinayaa "buuga" kicinta popover.
setContent Wuxuu bixiyaa hab lagu beddelo nuxurka popover ka dib markii la bilaabay.
show Waxay daaha ka qaadaysaa soo boodada curiyaha Ku soo noqoshada soo wacaha ka hor inta aan si dhab ah loo muujin popover (ie ka hor intaanay shown.bs.popoverdhacdada dhicin). Tan waxa loo tixgalinayaa "buuga" kicinta popover. Popovers oo cinwaankoodu iyo nuxurkooduba yahay eber-dherer weligood lama soo bandhigin.
toggle Beddelaa soo boodada curiyaha Ku soo noqda qofka soo wacaya ka hor inta aan bood-boodka dhab ahaantii la muujin ama la qarin (tusaale ka hor inta aanay dhacdada shown.bs.popoverama hidden.bs.popoverdhacdada dhicin). Tan waxa loo tixgalinayaa "buuga" kicinta popover.
toggleEnabled Waxay beddeshaa awoodda boodboodka curiyaha si loo muujiyo ama loo qariyo.
update Waxay cusboonaysiisaa booska boodboodka curiyaha.
// getOrCreateInstance example
const popover = bootstrap.Popover.getOrCreateInstance('#example') // Returns a Bootstrap popover instance

// setContent example
myPopover.setContent({
  '.popover-header': 'another title',
  '.popover-body': 'another content'
})
Habka setContentayaa aqbalaya objectdood, halkaas oo fure kasta oo hanti ah uu yahay stringdooriye 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.popover Dhacdadan ayaa isla markaaba la eryaa marka hidehabka tusaale ahaan loo waco.
hidden.bs.popover Dhacdadan waxa la eryaa marka popover uu dhammeeyo in laga qariyo isticmaalaha (waxa ay sugi doontaa inta uu CSS ka gudbayo dhamaystirka).
inserted.bs.popover Dhacdadan ayaa la eryaa dhacdada ka dib show.bs.popovermarka qaabka popover lagu daray DOM.
show.bs.popover Dhacdadani waxay isla markaaba gubataa marka showhabka tusaalaha la yiraahdo.
shown.bs.popover Dhacdadan waxa la eryaa marka popover-ka laga dhigo mid la arki karo isticmaaluhu (waxay sugi doontaa inta uu CSS ka gudbayo dhamaystirka).
const myPopoverTrigger = document.getElementById('myPopover')
myPopoverTrigger.addEventListener('hidden.bs.popover', () => {
  // do something...
})