1// https://stackoverflow.com/a/32475592/3673842
2
3// html
4'<button class="my-custom-button btn btn-outline-danger">My custom button</button>'
5
6$('#table-id tbody').on( 'click', 'button.my-custom-button', function () {
7 alert(alert($(this).text())) // will display "My custom button"
8})
9