How to set a property dynamically using javascript on oTable
How to set a property dynamically using javascript on oTable
I have a page with many DataTable objects in it. They all have a class "testAbcd" associated with them.
I am able to get all these objects using document.getElementsByClassName("testAbcd").
I am then iterating over these objects and need to set the value of the attribute 'sPaginationType' dynamically based on some conditions.
How can I achieve this? i.e. set the value of an attribute on the DataTable object.
Thanks
I am able to get all these objects using document.getElementsByClassName("testAbcd").
I am then iterating over these objects and need to set the value of the attribute 'sPaginationType' dynamically based on some conditions.
How can I achieve this? i.e. set the value of an attribute on the DataTable object.
Thanks
This discussion has been closed.
Replies
[code]
if ( pagingFull ) {
$(node).dataTable( { sPaginationType: 'full_numbers' } );
}
else {
// ... etc
}
[/code]
Allan