You can enable some javascript / jquery to change the colors of the buttons in the callback:
datatable(
iris2,
callback=JS('$("a.buttons-copy").css("background","red");
$("a.buttons-print").css("background","green");
return table;'),
extensions = 'Buttons', options = list(
dom = 'Bfrtip',
buttons = c('copy', 'print')
)
)
source
share