Get selected row when use Responsive table
Get selected row when use Responsive table

Hi, I have a problem with responsive table. When I resize the window and button was hidden this code doesn't work:
$('#usersTable tbody').on( 'click', 'button', function () {
usernameSelected = (userTable.row( $(this).parents('tr') ).data().username);
} );
Maybe the problem is on parents('tr'), but how can I get information when table was resized? I use the returned value to recognize the button of which row is clicked.
My table use ajax call. Thanks
This discussion has been closed.