I am getting console error "Uncaught TypeError: Cannot set property 'nTf' of undefined". I am using jquery Datatable.
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
Hi I had same problem but now I have fixed my problem. This problem occurs because there are more column in head tag than body tag. If you have same error then first check how many column in thead and tbody or tfoot .
Also, this error occurred for me when the columns in my Datatables setup did not match the columns in my HTML.
I fixed it by making sure they match.
(In the image below, they do not match, which caused the error.)
I ran into this problem too. All columns in tfoot matched thead. Just a simple step of clearing browser cache did the magic for me. Hope this helps someone.
Okey Let me just to be clear for everyone ,
tfoot > th
must be equal as yourthead > th
i just faced this kind of problem recently and trying to figure it out like couple mins so just make sure in the future someone maybe be faced it
In your table Check all colspan attribute values if its equal to the number of columns
As per https://datatables.net/forums/discussion/22697/uncaught-typeerror-cannot-set-property-ntf-of-undefined you probably have more cells in the header and/or footer of your table defined in your html than you are getting back from the server.
At least that's the issue I was having which gave me this error message.