Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

111
Vistas
Bootstrap tooltip/confirmation and confirmation not disappearing after data load refresh

I am refreshing a table every 5 seconds with JS. The file it loads has bootstrap tooltips and confirmations. When you are hovering over one of these elements, and the data refreshes, the tooltip or confirmation remains on the screen even if the mouse is no longer on the area.

Index JS

$(document).ready(function(){
    $('#table-main').load('functions/fetch-main.php');
    refreshTable();
});

function refreshTable(){
    $('#table-main').load('functions/fetch-main.php', function(){
        setTimeout(refreshTable, 5000);
    });
}

Within the functions/fetch-main.php file this is one of the tooltips

echo "<button type='button' class='btn btn-warning btn-sm' data-toggle='modal' data-target='#editlog' data-id='" . $row['id'] . "'><span data-toggle='tooltip' title='Edit Record'><i class='fas fa-edit'></i></span></button> ";

When the file loads again, the tool top remains on the screen

enter image description here

To get the tooltip and confirmation to work in the first place, I had to copy the following to the actual fetch file even though it is already in the main index file

<script type="text/javascript">
    $(document).ready(function(){
        $('[data-toggle="tooltip"]').tooltip();
    });
    $('[data-toggle=confirmation]').confirmation({
        rootSelector: '[data-toggle=confirmation]'
    });
    $('[data-toggle=confirmation-popout]').confirmation({
        rootSelector: '[data-toggle=confirmation-popout]'
    });
</script>

Is it possible to stop this from happening?

Thanks

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda