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

117
Views
No puedo agregar un botón a un popover

He estado tratando de agregar un botón a un popover. Tengo una cuadrícula de divs, generada a través de asp.net. Mi código se parece a esto:

 $(document).ready(function () { $('.hometable').popover({ html: true, trigger: "manual", title: function () { return $('#popover-title').html(); }, content: function () { return $('popover-content').html(); } }); $('.hometable').mousedown(){ $(this).popover("show"); } }
 <div id="popover-title" class="hide popover_name" hidden> <b>Overzicht</b> </div> <div id="popover-content" class="hide popover_name" hidden> <div> <button>Test</button> </div> </div> <table> @for(int i = 0; i < 5; i++){ <tr> @for(int j = 0; j < 5; j++){ <td class="hometable"> <div></div> <td> } </tr> } </table>

Si reemplazo el botón, por ejemplo, por Prueba , funcionará bien, pero no puedo incluir el botón de todos modos. ¿Alguna sugerencia? ¡Gracias por adelantado!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Parecía que mi botón se eliminó automáticamente tan pronto como se cargó debido a la funcionalidad predeterminada de "desinfección" incluida en la ventana emergente. Pude resolver el problema agregando la opción "desinfectar: falso" a la inicialización de mi popover. Mi código ahora se ve así:

 $('.hometable').popover({ html: true, trigger: "manual", sanitize: false, title: function () { return $('#popover-title').html(); }, content: function () { return $('popover-content').html(); } });
about 4 years ago · Juan Pablo Isaza Report
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!