buttons.buttons.attr
Since: Buttons 1.5.0
Collection of attribute key / values to set for a button.
Please note - this property requires the Buttons extension for DataTables.
Example
Copy button with title text and an id:
new DataTable('#myTable', {
layout: {
topStart: 'buttons'
},
buttons: [
{
extend: 'copyHtml5',
attr: {
title: 'Copy',
id: 'copyButton'
}
}
]
});