как минимум нужен код, в идеале трейс ошибки
иначе можно только сказать, что делаешь что то не так
$(document).ready(function () {
$('.delete-class').on('click', function () {
var id = $(this).data('id');
var url = '/delete/'+ id;
if (confirm('Delete Record?')) {
$.ajax({
url:url,
type: 'DELETE',
success: function (result) {
console.log('Deleting Recipe...');
window.location.href="/";
},
error: function (err) {
console.log(err);
}
})
}
})
})