TableTools example - customised button text

Preamble

You may wish to set your own text for the buttons in the TableTools toolbar, rather than relying on the default built-in text. This is done by overriding the sButtonText parameter of whatever button you wish to alter. The way TableTools allows you to alter a predefined button is by 'extending' it (using the sExtends parameter) and then setting the overriding parameter. A full list of the parameters which can be used is available on the DataTables.net web-site. This example shows how to set the button text as required.

Live example

Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Gecko Firefox 1.5 Win 98+ / OSX.2+ 1.8 A
Gecko Firefox 2.0 Win 98+ / OSX.2+ 1.8 A
Gecko Firefox 3.0 Win 2k+ / OSX.3+ 1.9 A
Gecko Camino 1.0 OSX.2+ 1.8 A
Gecko Camino 1.5 OSX.3+ 1.8 A
Gecko Netscape 7.2 Win 95+ / Mac OS 8.6-9.2 1.7 A
Gecko Netscape Browser 8 Win 98SE+ 1.7 A
Gecko Netscape Navigator 9 Win 98+ / OSX.2+ 1.8 A
Gecko Mozilla 1.0 Win 95+ / OSX.1+ 1 A
Gecko Mozilla 1.1 Win 95+ / OSX.1+ 1.1 A
Showing 1 to 10 of 57 entries

Initialisation code

$(document).ready( function () {
	$('#example').dataTable( {
		"sDom": 'T<"clear">lfrtip',
		"oTableTools": {
			"aButtons": [
				{
					"sExtends": "copy",
					"sButtonText": "Copy to clipboard"
				},
				{
					"sExtends": "csv",
					"sButtonText": "Save to CSV"
				},
				{
					"sExtends": "xls",
					"sButtonText": "Save for Excel"
				}
			]
		}
	} );
} );

Other examples