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

149
Views
¿La confirmación de Bootstrap no funciona dentro del evento onClick?

Tengo un botón y quiero agregar la confirmación de arranque. Esto funciona bien cuando llamo directamente, pero cuando uso el código de confirmación dentro del evento onClick, entonces la confirmación de Bootsrap no funciona. ¿Que esta mal aquí?

Este es mi código: -

 $('.myButton').on("click", function() { $('[data-toggle=confirmation]').confirmation({ rootSelector: '[data-toggle=confirmation]' }); }
 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-confirmation2/4.2.1/bootstrap-confirmation.min.js" integrity="sha512-LhgCuBuvISlfR3iVmjgchM6JrYvl16h/RJVsjdCfGXUahMHgmMJpavyIbluTuV3Ww8tJtGh2VAYayfoGvc84DA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <button data-toggle="confirmation" type="button" class="myButton mt-5 btn btn-primary btn-convert">Convert</button>

¡Gracias!

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!