I had a form that when I clicked on submit it was submitted. Then that form hid and the result of action page showed in div with classname=dig
.
It was worki
you should empty and fill the corresponding dig
element only as
$(".done").click(function(e) {
var url = 'http://seller.ir/test';
var digElement=$(this).parents('.dig');
$.ajax({
type: "POST",
url: url,
data: $(this).parent('.formi').serialize(),
success: function(data) {
digElement.html(data)
}
});
e.preventDefault();
});