Uncaught TypeError: Cannot read property 'nTr' of undefined - fnGetPosition() with TH elements

Uncaught TypeError: Cannot read property 'nTr' of undefined - fnGetPosition() with TH elements

VisualiseVisualise Posts: 4Questions: 1Answers: 0
edited April 2013 in Bug reports
Hi Allan,

Great job with the plugin, I can see a lot of work has been put into it!

I have noticed that fnGetPosition() generates the following error when used on a TH:
Uncaught TypeError: Cannot read property 'nTr' of undefined jquery.dataTables.nightly.js:4661

Here's the live example (same as example in documentation except with '#example th' selector):
http://live.datatables.net/egubir/edit

As I understand it, TH elements are allowed?

Thanks in advance,
Elan

Replies

  • allanallan Posts: 61,662Questions: 1Answers: 10,094 Site admin
    Hi Elan,

    Thank you for the link.

    TH elements absolutely are allowed, but fnGetPosition will only work on elements in the TBODY, not the THEAD: http://live.datatables.net/egubir/2/edit .

    Allan
  • VisualiseVisualise Posts: 4Questions: 1Answers: 0
    Ah I see.

    Thanks for the quick response Allan.

    Elan
This discussion has been closed.