Jquery problem with errorPlacement
<p>Greetings,</p>

<p>I have problem with errorPlacement, I'm trying to place the error message next to the field but it appearing on the top of the page.</p>

<p>any advice how to fix this problem??</p>

<p>here is my code:</p>

<pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="IMAM_APPLICATION.WebForm1" %&gt;
&lt;%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %&gt;

&lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;


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

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


    &lt;script type="text/javascript"&gt;

        $(document).ready(function() {
            $("#aspnetForm").validate({
                groups: {
                    username: "fname lname",
                    address: "address1 phone"
                },
                errorPlacement: function(error, element) {
                    if (element.attr("name") == "fname"
|| element.attr("name") == "lname")
                        error.insertAfter("#lastname");
                    else
                        error.insertAfter(element);
                },
                debug: true
            })
        });

    &lt;/script&gt;

&lt;/asp:Content&gt;
&lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
&lt;/asp:Content&gt;
&lt;asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server"&gt;

    &lt;p style="height: 313px"&gt;


              &lt;label style="position:absolute; top: 227px; left: 22px;"&gt;Your Name&lt;/label&gt;
&amp;nbsp;&lt;input name="fname" value="Pete"
                  style="position:absolute; top: 226px; left: 102px;"/&gt;
&lt;input name="lname" id="lastname"
                  style="position:absolute; top: 264px; left: 95px;"/&gt;
&lt;input name="address1" style="position:absolute; top: 347px; left: 102px;"/&gt;
&lt;input name="phone" id="lastname"
                  style="position:absolute; top: 315px; left: 102px;"/&gt;
&lt;br/&gt;
&lt;input type="submit" value="Submit Name" style="position:absolute; top: 407px; left: 73px;"/&gt;
&lt;input type="submit" value="Submit Address"
                  style="position:absolute; top: 370px; left: 437px;"/&gt;

    &lt;/p&gt;




    &lt;/asp:Content&gt;
</code></pre>
