I’ve got a table that when empty/filtered w/o results throws in a tr with a td with the class “dataTables_empty”. It has a message and a button that will attempt to clear the filter.
I’ve got a jquery handler that looks like this,
$('#accountUsersTable tbody').on("click", 'tr', function (e) {
//moves tr to another table and other magic.
}
Obviously, I don’t want to move this informative tr to the other table so I tried to add a :not() to the handler but couldn’t figure out how to not has child td with class dataTables_empty.
$('#accountUsersTable tbody').on("click", $('tr').filter('td').prop('class') != 'dataTables_empty', function (e) {
//moves tr to another table and other magic.
}
Or something :/
1 Answer