.after needs to be changed with right
<p>I am using the following jQuery function to append an element just after an input:</p>

<pre><code>var emailToVal = $("#nameFrom").val();
        if(emailToVal == '') {
            $("#nameFrom").after('&lt;div class="error"&gt;Please enter your name.&lt;/div&gt;');
            hasError = true;
        }
</code></pre>

<p>I need a way to append the element on the right of the input instead than after.</p>

<p>Is there a way to do it?</p>
