fnDisplayRow with url hash

fnDisplayRow with url hash

MDWMDW Posts: 3Questions: 0Answers: 0
edited July 2011 in Plug-ins
Dear all,

I would like to use the fnDisplayRow function / plug-in to display a specific page of paginated results according to a hash in the URL.

Having read an earlier post:

I see it is possible, but I cannot get it to work.

I have included the plug-in, and can jump to a page by node number successfully

[code]oTable.fnDisplayRow( oTable.fnGetNodes()[8] );[/code]

But following the other advice on that earlier post to attempt to locate the node position by the hash leaves me with an error message: "a.nodeName is undefined"

So I guess my questions is, how do I extract the node position number from my table by hash, or by id for that matter.

Each row of the table has an tag like so:

Many thanks in advance, and congratulations on an amazing plugin.



  • allanallan Posts: 62,377Questions: 1Answers: 10,234 Site admin
    Hi Mark,

    To confirm my understanding - you know what the hash is that you want to display, but you need a reference to the target node in order to pass it to fnDisplayRow? In which case you could do something like this:

    var n = $('#post123', oTable.fnGetNodes() )[0];
    oTable.fnDisplayRow( n );

This discussion has been closed.