Version 4, last updated by dmclean62 at 19 Jan 19:18 UTC
DataTables
This can be found at datatables.net. It is similar to TableSorter, but includes filtering as well as sorting.
Using DataTables
You will need to include:
- One of the JavaScript files (media/js/jquery.dataTables.js for development, media/js/jquery.dataTables.min.js for production)
- A style sheet; Examples can be found in media/css.
- The appropriate images from media/images
There are also a number of API extensions, the source for which is provided on the DataTables website. I put them all into a single .js file and added the script tag immediately after the script tag for the DataTables library.
DataTables also has a number of plug-ins of its own. If you use one or more of them, you will need to include whatever files are appropriate.
Dynamic updates in a CometActor
Once you invoke DataTable on a table, the library performs a fair amount of manipulation of the DOM. As a result, while it might be possible to manipulate the DOM directly using the regular JsCmd objects, doing so can be dangerous and or ineffective. If you choose to use DataTables, your best bet is almost certainly to manipulate the table using the DataTables API.
Updating a DataTables table
For updating the information in a row of the table, use a JsRaw to invoke the table’s fnUpdate method.