This is my code which I am using for my DataTable :
  var oTable12= $('#example').DataTable({
       "aaData": tableData,
       "aLengthMenu": [[5, 10, 20, -1], [5, 10, 20, "All"]],
       "iDisplayLength": 5,
       "aoColumnDefs" :tableColumn
       });
I am adding column headers and default content in tableColumn array and then using it in aoColumnDefs .
I am getting perfect UI as it is expected, but when I click the button I get the following error :
Uncaught ReferenceError: table is not defined
This is my code for button click :
    $('#example tbody').on( 'click', 'button', function () {
      var data = oTable12.row(0).data();
      alert( data);
    } );
Thank you



