How to remove the details-control class in the parent row if the CHILD DATATABLE is empty?
How to remove the details-control class in the parent row if the CHILD DATATABLE is empty?

Good night,
I created a new datatable for the child details. Some of the child datatables will be empty. I use subtable.data().count() to check if the child datatable is empty. If it is empty I want to remove the details-control class from the parent row. I wrote code to remove the class but that doesn't work.
I would appreciate any help in solving this problem.
Thank you.
Link to example code: http://live.datatables.net/jaziqiya/14/
This discussion has been closed.
Answers
Hi @dt_user ,
You can just use
$(this)
, as that's what was clicked upon - see: http://live.datatables.net/jaziqiya/15/editCheers,
Colin
This example takes a different approach and removes the details control button if no data exists. It does this in
createdRow
so the button is removed when the row is displayed.Kevin