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
$(".done").click(function(e) {
var url = 'http://seller.ir/test'
$.ajax({
type: "POST",
url: url,
data: $(this).parents("form").serialize(),
success: function(data) {
$(this).parents("dig").empty()
$(this).parents("dig").html(data)
}
});
e.preventDefault();
});
.dig {
width: 200px;
height: 30px;
border: 1px solid #000
}
Try This!And send update if it doesn't work.