Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

115
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda