after() wont display error message
<p>Can anybody try to take a look at the code please, i am new in jQuery. Thank you, guys.</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;Registration&lt;/title&gt;

    &lt;script type="text/javascript" src="lib/jquery/jquery-1.4.2.js"&gt;&lt;/script&gt;

    &lt;script type="text/javascript" src="/dateplugin.js"&gt;&lt;/script&gt;

    &lt;link rel="stylesheet" type="text/css" href="/stylez.css" /&gt;

    &lt;script type="text/jscript"&gt;
            $(document).ready(function(){
            //$.dateSelectBoxes('mon','da','yea');  
            //form validation
        var hasError = false;
        var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/;
        var email = $("#em").val();
        var fname=$("#fn").val();
        var lname=$("#ln").val();
        var school=$("#sch").val();
        var classes=$("#clas").val();
        var grade=$("#yr").val();
        var month=$("#mon").val();
        var days=$("#da").val();
        var years=$("#yea").val();
        var pass=$("#pas").val();
        var zipcode=$("#zip").val();

        $("#submitbutton").click(function(e){
        if (fname==''){
            $("#fn").after("Please enter your first name ");
            hasError=true;
        }    
        if (lname==''){
            $("#ln").after("Please enter your last name");
            hasError=true;
        }    
        if(school==''){
            $("#sch").after("Please enter the name of your institution");
            hasError=true;
        }    
        if (classes==''){
            $("#clas").after("Please enter current classes you are taking");
            hasError=true;
        }    
        if (month=='' || day=='' || year==''){
            $("#mon").after("Please enter your birthday");
            hasError=true;
        }    
        if (pass==''){
            $("#pas").after("Please enter the password");
            hasError=true;
        }
        if (zipcode==''){
            $("#zip").after("Please enter your zipcode");
            hasError=true;
        }
        if (grade==''){
            $("#yr").after("Please enter the year you are in");
            hasError=true;
        }
        if(email == '') {
            $("#em").after("You forgot to enter the email address to send ");
                 hasError = true;
        } else if(!emailReg.test(email)) {
             $("#em").after("Enter a valid email address to send to.");
             hasError = true;
        }
        if (hasError == true) {    
            e.preventDefault();
        }
        else {
            //submit form via ajax
        }
        });
        });
    &lt;/script&gt;

    &lt;style type="text/css"&gt;

    &lt;/style&gt;
&lt;/head&gt;
&lt;body class="fancy"&gt;
    &lt;form action="" method="" accept-charset="utf-8"&gt;
    &lt;table width="800" border="0" cellpadding="1" cellspacing="0"&gt;
        &lt;tr&gt;
            &lt;td id="column1"&gt;
            &lt;/td&gt;
            &lt;td id="column2"&gt;
                &lt;div class="Sintext"&gt;
                    &lt;h1&gt;
                        Sign Up&lt;/h1&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        First Name&lt;/label&gt;
                    &lt;input type="text" name="fnam" class="fields" id="fn" /&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Last Name&lt;/label&gt;
                    &lt;input type="text" name="lnam" class="fields" id="ln" /&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        School&lt;/label&gt;
                    &lt;input type="text" name="scname" class="fields" id="sch" /&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Major&lt;/label&gt;
                    &lt;select id="majo" name="major"&gt;
                        &lt;option value="5"&gt;&amp;mdash;undeclared&amp;mdash;&lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Current Classes&lt;/label&gt;
                    &lt;input type="text" name="class" id="clas" class="fields" /&gt;
                    &lt;span&gt;
                        add class field&lt;/span&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Year&lt;/label&gt;
                    &lt;select id="yr" name="year"&gt;
                        &lt;option value=""&gt;&amp;mdash;Select the year &amp;mdash;&lt;/option&gt;
                        &lt;option value="10"&gt;Freshman &lt;/option&gt;
                        &lt;option value="20"&gt;Sophomore&lt;/option&gt;
                        &lt;option value="30"&gt;junior&lt;/option&gt;
                        &lt;option value="40"&gt;senior&lt;/option&gt;
                        &lt;option value="50"&gt;Alumni &lt;/option&gt;
                        &lt;option value="60"&gt;HighSchool &lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Campus&lt;/label&gt;
                    &lt;input type="text" name="campus" class="fields" /&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Email&lt;/label&gt;
                    &lt;input type="text" name="email" id="em" class="fields" /&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Password&lt;/label&gt;
                    &lt;input type="text" name="passwd" id="pas" class="fields" /&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Sex&lt;/label&gt;
                    &lt;select name="sex" class="sexfield"&gt;
                        &lt;option value="3"&gt;Male&lt;/option&gt;
                        &lt;option value="4"&gt;Female &lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;
                &lt;div id="bdate"&gt;
                    &lt;label&gt;
                        Birthday&lt;/label&gt;
                    &lt;select id="mon" name="mont"&gt;
                        &lt;option value="0"&gt;Month&lt;/option&gt;
                    &lt;/select&gt;
                    &lt;select id="da" name="day"&gt;
                        &lt;option value="1"&gt;Day&lt;/option&gt;
                    &lt;/select&gt;
                    &lt;select id="yea" name="year"&gt;
                        &lt;option value="2"&gt;Year&lt;/option&gt;
                    &lt;/select&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label&gt;
                        Zipcode&lt;/label&gt;
                    &lt;input type="text" name="zipcod" id="zip" class="zipfield" /&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;button id="submitbutton" class="sinbutton"&gt;
                        Sign Up&lt;/button&gt;
                &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
