Catching sort calls before the actual sort
Catching sort calls before the actual sort
Nealium
Posts: 1Questions: 1Answers: 0
I am trying to make a function that removes a row in the table before the table is sorted, i've got a jquery function that listens to the click event for the headers. but when i click the header the table gets sorted and then the jquery function is called, is there any way to reverse the order or a better way of removing a row by id?
This discussion has been closed.
Answers
If you attach a click event listener to the
th
element before you initialise the DataTable, your event will be executed first (since jQuery just executes them in sequential order).edit
Use
row().remove()
with an id selector forrow()
.Allan