buttons.dom.buttonContainer
DOM configuration of a button container element.
Please note - this property requires the Buttons extension for DataTables.
Description
This option provides the ability for each button to be wrapped in another element. This can be useful for cases where the styling framework requires a list of buttons, where the list element is just a container and not the button itself (Zurb Foundation requires this for example).
By default this option is null
which means that the button is not wrapped in a container element.
Please refer to the buttons.dom
documentation for an overview of the DOM structure that Buttons will create.
Type
Examples
DataTables initialisation: Use a ul/li/a list of buttons:
$('#myTable').DataTable( {
buttons: {
dom: {
container: {
tag: 'ul'
},
buttonContainer: {
tag: 'li'
},
button: {
tag: 'a'
}
}
}
} );
Instance initialisation: Use a ul/li/a list of buttons:
new $.fn.dataTable.Buttons( table, {
dom: {
container: {
tag: 'ul'
},
buttonContainer: {
tag: 'li',
className: 'button-item'
},
button: {
tag: 'a'
}
}
} );