Attr option on Button extension does not work
Attr option on Button extension does not work
marcusorjames
Posts: 1Questions: 1Answers: 0
Following the documentation I'm adding attrs as follows:
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
{
extend: 'print',
footer: false,
exportOptions: {
stripHtml: false
},
attr: {
id: "test"
}
}
]
} );
But the attribute is not being added to the button.
Please see this js fiddle
Answers
You are loading buttons version 1.0.3:
The
buttons.buttons.attr
states that this feature was introduced in Buttons 1.5.0. The current version is 2.2.3. Use the Download Builder to get the latest versions of the libraries.Kevin