DataTables 1.9.0

DataTables CDN files for DataTables 1.9.0. This software was originally released on 1st February, 2012.

Release notes

I'm absolutely delighted to release DataTables 1.9.0! This is a very significant step forward for the library as a whole over the previous releases with a huge range of improvements, new features and development options. Please see the upgrade notes for full information:

In terms of differences from 1.9.0 beta 3, the biggest change is the new underscore function, which is very similar to the $ function, but used for getting data from the table based on the given selector. There are a number of fixes as well, mainly documentation related, but a few other important bug fixes for the 1.9.0 release (see the release notes below).

  • New: API: fnGetData now also allows TD/TH nodes to be passed in and DataTables will figure out the data for the cell, returning that - easier than calculating the column index yourself. So you can now get the whole table's data, a row's data or an individual cell's data from the fnGetData function (you could get the cell data before, but you would need to use fnGetPosition).
  • New: API: Underscore function updated to use fnGetData rather than its internal function calls. Although slightly more expensive in computation terms, it extends the capacibabites of the underscore function greatly, allowing TD nodes to be the result of the selector as well as TR nodes. So now you can get a column of data with something like: $('#example').dataTable()._('td:nth-child(4)') . Cool :-)
  • Fix: Docs: oSearch should be a namespace
  • Fix: Docs: fnVersion check should be marked with @type function
  • Fix: Docs: Typo
  • Fix: When mDataProp was used to get a nested object, but a parent object didn't exist it would throw an unrecoverable error. With this change the behaviour matches that of single level data whereby if data cannot be found, at any level, then undefined is returned from the data get object. This means that if sDefaultContent is defined then that will be used instead, and if not defined an error will still be given (although this one under DataTables' control).
  • Fix: Remove characters 0x80-0xFF. I had a new non-ASCII characters in by mistake and the PHP JSON processor objects to these characters when parsing the output from the JSDoc debug output.
  • Fix: With scrolling enabled, adding the scrollbar width to the header / footer inner container elements could cause the table to resize incorrectly on the following draw (and this error was cumulative). Fix is not to adjust the inner element for the scrollbar width - makes no difference to the table draw. It is possible that if you've styled this element you might need to take this change into account, but by default DataTables will style the parent (scrollHead) so no change is required (regardless of jQuery UI theming enablement) - 6776.
  • Fix: The calculation to detect if the scroll bar would be shown in IE6/7 was incorrect - it was calculating the height of the entire table, rather than just the body of the table (i.e. body + header + footer) which caused the "correct" for the scrollbar to be incorrectly applied to small tables.
  • Fix: Multiple tables were going haywire on initialisation due to the self reference - 8233
  • Docs: The options (properties) for the DataTables initialisation object that have a default function need an @member tag otherwise they are documented as methods, which they are not.
  • Docs: Add a "dtopt" tag to options that should be documented on the DataTables main site. This allows that documentation to be automatically generated from the source as well as the auto gen developer documentation.
  • Docs: Fix a few small issues with some of the documentation comments
  • Docs: API: Underscore function documentation updated to take account of allowing TH/TD cells in the selector
  • Examples: Fix: SyntaxHighlighter was having problems with copy and paste in webkit browsers - fix pushed to syntax highlighter here: - this is the commit of that fix to the local copy
  • Dev: Code size - also in fnSetColumnVis reduce code size with aoData references in the same way as we do for aoColumns. Smaller size and more consistency. All good.
  • Dev: Get the library size back under the target 70000 bytes. Its a bit of a cheap shoot this one, but every little helps!
  • Dev: Remove the oSettings 'get' in _ - don't need it anymore with the call to fnGetData
  • Dev: New internal function called _fnNodeToColumnIndex, adapted from fnGetPosition for reuse.
  • Dev: Removed the "fast lookup" function for data get and set as they weren't really that useful in terms of speed and would require more code to be added to copy with the above change to the error handling for missing objects. Smaller code and virtually no difference in speed. Sold.
  • Dev: Trivial modification to bring 1.9.0 back under the target size of 70000 btyes (was only 4 out). Simply reference the previous search object to a local variable so the compressor can compress more