function on button only works on first ajax request
function on button only works on first ajax request
![manuel_shanks](https://secure.gravatar.com/avatar/ffed0280f2f9b7d3ce2bfc3ed62ed78f/?default=https%3A%2F%2Fvanillicon.com%2Fffed0280f2f9b7d3ce2bfc3ed62ed78f_200.png&rating=g&size=120)
this code is only executed in the first ajax request, then it tells me that data is undefined
$('#tablaPersonaModal tbody').on( 'click', 'button', function () {
var data = table.row( $(this).parents('tr') ).data();
//alert( data[0] +" test information: "+ data[2] );
console.log(data);
} );
This discussion has been closed.
Replies
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin