add custom js function for ajax for datatables