Tengo un boton en un Display-types(Semantic UI modal) pero no funciona el onclick
Tengo un boton en un Display-types(Semantic UI modal) pero no funciona el onclick
luis_rubio20
Posts: 2Questions: 2Answers: 0
$(document).ready(function() {
$('#example').DataTable( {
destroy: true,
'ajax' : {
'url' : './listado.php',
'type' : 'post',
"dataSrc": "",
},
"columns": [
{ "data": "nombre" },
{ "data": "balance"},
{ "defaultContent": ' '}
],
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.modal( {
header: function ( row ) {
var data = row.data();
return 'Modal';
}
} ),
renderer: $.fn.dataTable.Responsive.renderer.tableAll()
}
}
} );
} );
var table = $("#exampple")DataTable();
$('#example tbody').on('click', 'a.edit', function () {
var data = table.row('tr').data();
alert( 'You clicked on s row' );
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I put your code in a test case:
http://live.datatables.net/ceyuzosi/1/edit
I added
data: null,
to this statement to get the element to appear:The click event works. If you still have issues please provide a link to your page or a test case showing the issue. You can update my example.
Kevin