Getting a specific row

Getting a specific row

ustunustun Posts: 2Questions: 0Answers: 0
edited March 2011 in General
I am trying to access some rows that are hidden due to paging, for example, I am trying to access a row with class "abc' on page 2 when I'm on page 1.

To get that row, I am trying to use oTable.fnGetNodes(), however this returns an array of tr's. How can I get tr's of class 'abc'?

I have tried $('tr.abc', oTable.fnGetNodes()) and various other combinations (as I saw while searching the forums), but they all return empty arrays. Is there a simple way to filter that array? (oTable.fnGetNodes() returns a nonempty array, so that is not the problem.)

(Sorry if this is not a datatables specific question.)

Thanks,

Ustun

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Try:

    [code]
    $( oTable.fnGetNodes() ).filter( 'tr.abc' );
    [/code]

    Allan
  • ustunustun Posts: 2Questions: 0Answers: 0
    Thanks a lot Allan, I had tried find(), and children(); filter() is the right function.
This discussion has been closed.