code not working

code not working

zionistzionist Posts: 19Questions: 3Answers: 0

am applying this code to my document and nothing happens when i click on a row in the table. What could be the problem?

$(document).ready( function () { var table = $('#expenseList').dataTable(); $('#expenseList tbody').on('click', 'tr', function () { var data = table.row(this).data(); console.log(data); }); } );
This discussion has been closed.