I've got multiple data-tables and they all have their own ID.
Now this is no problem at all, the problem I'm having is that my code seems to be able to output my console.log() calls perfectly but in my Network tab I don't see my ajax call?
I'm using the following jQuery code:
function DtAjax(type) {
console.log("Type: "+type);
if($('#data-table_' + type + '_wrapper').children().length == 0){
console.log("True");
$('#data-table_' + type).DataTable({
"ajax": "<?php echo base_url('admin/emails/ajax/get'); ?>" + "/" + type
});
console.log("End function");
}
}
$(document).ready(function(){
DtAjax(1);
$("li .changeContent").on('click', function (event) {
event.preventDefault(); // Prevents going to a different URL
// Content change
$(".mailContent").hide('drop', 500).removeClass("active_div");
$("." + $(this).attr('data-open')).delay(500).show('drop', 500).addClass("active_div");
// button set new active
$("#icon_nav_h > li.active").removeClass('active');
$(this).parent().addClass('active');
});
});
It is logging everything inside the DtAjax function, any (obvious) reason why I cant find the Ajax call in my Network tab?