$("#more").submit(function (event) {
event.preventDefault();
alert('estou aqui');
var link = $("#link").val();
var date = $("#date-foundation").val();
var validation = true;
if (link === null || link === '') {
$("#link").addClass("input-required");
validation = false;
}
if (validation === true) {
$.ajax({
url: './model/functions/link_repeat.php',
type: 'POST',
data: {link: link},
success: function (data) {
alert(data);
if (data === 'true') {
$("#link").addClass("input-required");
$("#alert-link").append("<span style='color:red'><b>Esse link já existe! Escolha outro!</b></span>");
return;
}
}
});
}
});