$('#example').DataTable( { dom: 'Bfrtip', buttons: [ { text: 'My button', action: function ( e, dt, node, config ) { alert( 'Button activated' ); } } ] } );