$(document).ready(function(){
$("#form").submit(function(event) {
//I am preventing the default submit of the form so that the
//page does not reload on complete. (this is the default action). You
//could also return false from our handler to do the same thing. A
//useful application of this is to return true only on correct
//validation, and false otherwise.That way the form only submits if true
event.preventDefault();
//YOUR CODE AFTER HERE
var insert;
if($('input[type="text"]').val() === "codecademy"){
insert = "Correct!";
}else{
insert = "Error!";
}
$('#form span').text(insert).show().fadeOut(1000);
});
});