My problem is simple, the solution is not for me.
I have an operation in my JS which I do:
$(document).ready(function () {
$('.botonEliminar').click(function (e) {
e.preventDefault();
var fila = $(this).parents('tr');
var id = fila.data('id');
var form = $('#form-delete');
var url = form.attr('action').replace(':user_id', id);
var data = form.serialize();
$.post(url,data, function (respuesta) {
//alert(respuesta);
//fila.fadeOut();
location.reload();
}). fail(function () {
alert('No se pudo eliminar el usuario');
}); }); });
Anyway, what I want is that I do not do the location.reload (); Therefore, what I need is for the div that I do the validation to refresh without doing the whole page.
$("#container").load("/");
In that what I do is refresh the DIV but at the same time I insert the home page which I just want to refresh that DIV.
What do you advise me?
Use: Laravel 5.3 Jquery 2.1.3
Anyway, the Laravel works well for me, the problem is the DIV and my execution.