working with document fragments?

working with document fragments?

ifaceiface Posts: 23Questions: 8Answers: 0

Hi y'all

$.fn.dataTableExt.oApi.fnAddTr() is expecting a Node. Is there a way to add a TR which is a document fragment, to a dataTable?

thanks

This question has an accepted answers - jump to answer

Answers

  • ifaceiface Posts: 23Questions: 8Answers: 0

    In case someone else is looking for this. Datatables doesn't work with DocumentFragments.

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    Answer ✓

    That particular plug-in method doesn't work with a document fragment but that is not to say DataTables as a whole doesn't. Indeed it uses them internally.

    And in fairness that method is now redundant with the new API in 1.10. Try using the row.add() method. I haven't died it with a document fragment, but it might just happen to work.

    Allan

  • ifaceiface Posts: 23Questions: 8Answers: 0

    Bummer... it doesn't work with a fragment.

This discussion has been closed.