you should use "bDestroy": true.
Replace a DataTable which matches the given selector and replace it with one which has the properties of the new initialisation object passed. If no table matches the selector, then the new DataTable will be constructed as per normal.
$(document).ready(function() {
$('#ideas').dataTable({
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 50, "All"]],
"bDestroy": true
});
});
Also try this before creating the new datatable that destroy previous datatable objects.
$(document).ready(function() {
$("#ideas").dataTable().fnDestroy();
$('#ideas').dataTable({
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 50, "All"]]
});
});