always needed?
always needed?
Hi,
just a quick question, for which I just need a short confirmation:
On http://datatables.net/usage/ it is said, that a table needs the "thead" and "tbody" sections to be declared.
Is this also required if I only want pagination and filtering (but not sorting) for a table? And how about the TableTools?
Thanks!
Tobias
just a quick question, for which I just need a short confirmation:
On http://datatables.net/usage/ it is said, that a table needs the "thead" and "tbody" sections to be declared.
Is this also required if I only want pagination and filtering (but not sorting) for a table? And how about the TableTools?
Thanks!
Tobias
This discussion has been closed.
Replies
Yes - thead and tbody are required at all times by DataTables, regardless of sorting enablement etc. TableTools is a plug-in for DataTables only (it's not a standalone application) and therefore also required thead and tbody to be defined.
Hopefully it's not to much trouble to add these tags in (it's good semantic HTML apart from anything else :-) ). If you are using a CMS that doesn't output thead and tbody, and you can't modify it's templates, then what you can do is use Javascript to create the two required tags and then shunt the TR tags into each section as required (the first one into thead, and the remainder into tbody for example).
Regards,
Allan