Hi guys,
I want to use DataTable with Bootstrap theme to display my table result (PHP & SQLSRV) where it will be loaded into div using jquery $.get function.
I tried below code but it didn't work. Below is my code for jquery and appreciated if you can provide me some solutions here.
$(document).ready(function () { $("#getData").on('click', function () { var report = $(this).val(); if (report == 'tput') { var tputpage = 'reports/dtput.php', dstrt = $('#from_date').val(), dend = $('#to_date').val(); $.get(tputpage, { dstrt:dstrt, dend:dend }, function (data) { $('.target').html(data,function(){ $('table').dataTable(); }); }); } });