Try changing
var table = $('#sample_3').dataTable();
to
var table = $('#sample_3').DataTable();
... that is, capitalize the DataTable(). Source: https://datatables.net/manual/api#Accessing-the-API
DataTable()