Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
¿Cómo usar popover de bootstrap 5? No puedo usar el método myPopover.show()

aquí está el código html:

 <button type="button" class="btn btn-secondary mx-2" id="popOverId" data-bs-toggle="popover" title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?"> Your Cart(<span id="cart">0</span>)</button>

ella es código js:

 var myPopover = document.getElementById('popOverId'); myPopover.show();

cuando intento el código anterior, tengo un error:

 (index):635 Uncaught TypeError: myPopover.show is not a function

También cuando uso el siguiente código

 var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')) var popoverList = popoverTriggerList.map(function (popoverTriggerEl) { return new bootstrap.Popover(popoverTriggerEl, options) })

funciona bien, pero quiero algo que inicialice el popover primero pero no lo muestre, cuando se hace clic en el botón, solo lo activo para mostrar el popover

Además, ¿alguien puede decir cómo pasar datos al atributo "contenido" de popover Bootstrap5?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!