{hero}

buttons.buttons.namespace

Since: Buttons 1.0.0

Unique namespace for every button.
Please note - this property requires the Buttons extension for DataTables.

Example

Button which has mouse enter / leave (hover) event listeners:

new DataTable('#myTable', {
	layout: {
		topStart: 'buttons'
	},
	buttons: [
		{
			text: '',
			init: function (e, dt, node, config) {
				node.on('mouseenter' + config.namespace, function () {
					console.log('Mouse enter');
				});

				node.on('mouseleave' + config.namespace, function () {
					console.log('Mouse leave');
				});
			},
			destroy: function (dt, node, config) {
				node.off('mouseenter' + config.namespace);
				node.off('mouseleave' + config.namespace);
			}
		}
	]
});