JQuery Validation results being placed outside of the cell
<p>I'm having trouble getting the validation function results "Required field" to fill the text input box of a table.</p>

<p>The current code is placing the result to the right of the cell instead of inside.
I'm fairly positive it's the $(this).parent().append portion but after trying several other variations I haven't achieved the expected results.</p>

<p>*The code verifies that a value is currently in the cell by means of examining the class = requiredField attribute.</p>

<p>Any tips are much appreciated. -Thank you.</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
$('form#commentform').submit(function() {
    $('form#commentform .error').remove();
    var hasError = false;
    $('.requiredField').each(function() {
        if(jQuery.trim($(this).val()) == '') {
            $(this).parent().append('&lt;span class="error"&gt;*Required field&lt;/span&gt;');
            hasError = true;
        }
    });
    if(!hasError) {
        alert('Validation Complete');
    }
    return false;
  });
});
&lt;/script&gt;
</code></pre>
