$(document).ready(function() {
$("#form").submit(function() {
var form = $(this);
$.ajax({
type: "POST",
url: "mail.php",
data: form.serialize()
}).done(function() {
form.find("input").val("");
form.trigger("reset");
alert("Спасибо за заявку! Скоро мы с вами свяжемся.");
});
return false;
});
});
<input class="contacts__register--form-item">
<button class="contacts__register--button"></button>
<div class="square"></div>
.square,
.square:before,
.square:after {
border: solid #000 3px;
}
.square {
position: relative;
width: 100px;
height: 100px;
border-left: 0;
margin: 0 auto;
}
.square:before,
.square:after {
content: '';
display: block;
position: absolute;
border-right: 0;
}
.square:before {
top: 0;
right: 100%;
width: 150%;
height: 40px;
margin: -3px -3px 0 0;
}
.square:after {
left: 0;
top: 40px;
bottom: 0;
}