jquery error message place in div (jquery.validate.js)
<p>I have the following script which validates pages using jquery.validate.js through a quiz and works perfectly. Im looking to have the error message for required fields to be placed into a div called errormessage.  jQuery validate usually returns a message "this field is required".</p>

<p>Here is the script</p>

<pre><code>&lt;script type="text/javascript"&gt;
var curPage=1;
function NextPage() {
    if (curPage &lt; &lt;?= $num; ?&gt;) {
        var group = "#page_" + curPage.toString();
        var isValid =true;
         $(group).find(':input').each(function (i, item) {
              if (!$(item).valid())
                isValid = false;
            });

        if( !isValid){ alert("PLEASE MAKE A SELECTION"); }
        else{
            $("#page_" + curPage.toString()).hide(); //hide current page div
            curPage++;  //increment curpage
            $("#page_" + curPage.toString()).show(); //show new current page div
        }
    }
}
 function PrevPage() {

     if (curPage &gt; 1) {
         $("#page_" + curPage.toString()).hide(); //show new current page div
         curPage--;  //increment curpage
         $("#page_" + curPage.toString()).show(); //hide current page div
     }
 }

 function InitializePage() {
     $(".wizardPage").hide();
     $("#page_" + curPage.toString()).show();


     $("#surveyForm").validate({onsubmit: false});

 }




 $(document).ready(InitializePage
    );
&lt;/script&gt;
</code></pre>
