Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

fnGetAdjacentTr for 1.10

$
0
0

I need to iterate my table rows based on current sort and filter criteria, and see that fnGetAdjacentTr is the plug-in to accomplish this. I included the plugin like this:

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/plug-ins/1.10.10/api/fnGetAdjacentTr.js"></script>

My table is initialized and used like this:

oTable = $('#lynx_table_1').DataTable(defaultOptions); 

From the example shown here: https://www.datatables.net/plug-ins/api/fnGetAdjacentTr I wrote my test code as follows:

 var n1 = $('#lynx_table_1 tbody tr').eq(2)[0];
 var next = oTable.fnGetAdjacentTr( n1 );
 var prev = oTable.fnGetAdjacentTr( n1, false );

I verified that n1 is pointing at the proper row, but the next line throws the following error: TypeError: oTable.fnGetAdjacentTr is not a function

Now, I realize that this plug-in is written in the pre-1.10 style, and I am using 1.10, but I thought that including the code, regardless of the style, would work across versions like this.

With 1.10, how do I call this 1.9x plug-in, or is my problem somewhere else?


Viewing all articles
Browse latest Browse all 2364

Trending Articles