I think i have a simple issue. I have a set of fields on my form:
<input class="one-third" id="Firstname" type="text"/>
When one of these fields are blank, my validation should highlight the field (red boarder).
I have attempted the fiddle - http://jsfiddle.net/oampz/Ybxk2/1/
$(".submitForm").click(function() {
if($("#Firstname").val() == ''){
alert('Input can not be left blank');
$("#Firstname").addClass("highlight");
}
//document.forms[0].submit();
});
But it doesnt seem to work.
Should i be removing my original class?
Thanks