I am not sure why the below JS will not work on my Bootstrap page. I am getting this code straight from an online tutorial and I cannot seem to get it to work the way the instructor does. The console is telling me he issue is on the 3 line of the below script.
if (error != "")
{
$("#error").html('<div class="alert alert-danger"
role="alert"><strong> There was error(s) in your form:</strong>'
+ error+ '</div>');
}
});