I am using a DataTable with dynamic content created when the page loads. In the table, I used download confirmation. To download it below the script.
$( document ).ajaxStop(function() { $(document).find('[data-toggle="confirmation"]').confirmation(); });
Opens a confirmation window, but when you click Yes or No, it does not work.
This does not work
I have the code below to detect the Confirmed event.
$(document).ready(function(){ $(document).find('.delete-record').on('confirmed.bs.confirmation', function() { var thisEl = $(this); deleteForm($(this).attr('data-delid')); }); });
Works
$(document).ajaxStop(function(){ $(document).find('.delete-record').on('confirmed.bs.confirmation', function() { var thisEl = $(this); deleteForm($(this).attr('data-delid')); }); });
What happened to document.ready ?

Edit:
I have the same code with document.ready that works on another page but there is no DataTable, this is the HTML DIV structure.
source share