function on button only works on first ajax request

function on button only works on first ajax request

manuel_shanksmanuel_shanks Posts: 1Questions: 0Answers: 0

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);
} );

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    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

Sign In or Register to comment.