Hi guys,
I have
{ data : null, title : "Email details" , "defaultContent": "<button>Email!</button>"},
I have the button click working in the rows using
$('#dtDataChanged tbody').on( 'click', 'button', function () {
var tr = $(this).closest('tr');
if ( $(tr).hasClass('child') ) {
tr = $(tr).prev();
}
var data = tableDataChanged.row( tr ).data();
console.log( data['notes'] );
var dataInEditor = encodeURI(data['notes']);
reqSendEmail = Ajax("http://www.xxx.com/php/xxx.php?body=" + dataInEditor , emailSent);
} );
I show all the cells in the modal using
tableDataChanged = $('#dtDataChanged').DataTable( {
responsive: {
details: {
renderer: $.fn.dataTable.Responsive.renderer.tableAll(),
display: $.fn.dataTable.Responsive.display.modal( {
header: function ( row ) {
var data = row.data();
return 'Details for Quote ID '+data.quoteID;
}
} )
}
}
When I use the modal form in responsive the button shows but obviously not click action.
What is the correct syntax to get the button to work in the modal form
Cheers
Steve Warby