Button in the header. How to handle event?
Button in the header. How to handle event?
jonjvaughn
Posts: 2Questions: 1Answers: 0
I am using the technique described here to add a button to my table header:
$(document).ready(function() {
$('#example').DataTable( {
"dom": '<"toolbar">frtip'
} );
$("div.toolbar").html('<button type="button">Click Me!</button>');
} );
However after that I am stuck not knowing how to detect and act on the click. Thank you in advance.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
@jonvaughn, you could try to add this part after the line you showed in your example:
Hope this helps,
Excellent for what I need. Thank you.