fnDeleteRow with jQuery 1.4.3

fnDeleteRow with jQuery 1.4.3

ZaylrilZaylril Posts: 2Questions: 0Answers: 0
edited October 2010 in General

When using the fnDeleteRow with the new jQuery (1.4.3) I get the error "g.nodeName is undefined", shows up as line 93 of the jquery.min.js file. I've tried it with the new nightly version of datatables but still get the same error. When I go back to 1.4.2 it all works fine again.



  • allanallan Posts: 46,545Questions: 1Answers: 6,495 Site admin
    Interesting! I've not come across this, and fnDeleteRow appears to work okay with jQuery 1.4.3 for me. Could you link us to an example please?

  • ZaylrilZaylril Posts: 2Questions: 0Answers: 0
    Hi Allan,

    Actually it wasn't datatables causing the problem. I was originally using oTable.fnDeleteRow($(this).closest('tr')); to delete the current row, as I have a panel of icons in each row where you can manipulate the data in each row including deleting it. This worked fine in 1.4.2 but in 1.4.3 it errors, I've now changed it too oTable.fnDeleteRow($(this).parent());

    This seems to works fine, although straight after I add a new Row (and use fnAddData) and then delete it straight away it removes the wrong DOM element not the one that was just added, whereas the closest code in 1.4.2 seemed to work in this respect.

  • allanallan Posts: 46,545Questions: 1Answers: 6,495 Site admin
    It looks like $().closest() has changed significantly with the 1.4.3 release: http://blog.jquery.com/2010/10/16/jquery-143-released/ . It is possibly that this change in functionality was intentional (as part of a tightening of the functionality for example), or possibly a bug that has been introduced...

    Either way - good to hear it's not a DataTables issue, and that you have a work around!

This discussion has been closed.