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

109
Views
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
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!