When you instantiate a tabletrim object using tabletrim()
, the function call returns an object which exposes several public methods for interacting with the table. The methods can be called by storing the returned object in a variable and
calling the appropriate method from that object. The available public methods and simple examples can be found below.
Manually trim the table.
options.init
will be used.
1
2
3
4
// Store the return object in a variable
var tt = tabletrim($('#tabletrim-example'));
// Manually trim the table and activate the third column
tt.trim(3);
Manually untrims the table.
1
2
3
4
// Store the return object in a variable
var tt = tabletrim($('#tabletrim-example'));
// Manually untrim the table
tt.untrim();
Manually activate a column. If the table is not already trimmed, calling activate()
will trim it.
options.init
will be used.
1
2
3
4
// Store the return object in a variable
var tt = tabletrim($('#tabletrim-example'));
// Manually activate the third column
tt.activate(3);