fnGetAdjacentTr

Due to the fact that DataTables moves DOM elements around (mainly tr
elements for sorting and filtering) it can at times be a little tricky to get
the next row based on another, while taking into account pagination,
filtering, sorting etc.

This function is designed to address exactly this situation. It takes two
parameters, the target node, and a boolean indicating if the adjacent row
retrieved should be the next (true, or no value) or the previous (false).

CDN

This plug-in is available on the DataTables CDN:

JS

Note that if you are using multiple plug-ins, it is beneficial in terms of performance to combine the plug-ins into a single file and host it on your own server, rather than making multiple requests to the DataTables CDN.

Version control

If you have any ideas for how this plug-in can be improved, or spot anything that is in error, it is available on GitHub and pull requests are very welcome!