jQuery - Validation doesnt seem to be working
<p>Im trying to hook up some validation for a site that im doing ... i have to admit, im not a jquery ninja.</p>

<p>So what i have done is taken validation from another site and added it to my site but it doesnt seem to be working.</p>

<p>My HTML is as follows</p>

<pre><code>&lt;label for="yourname"&gt;Your name&lt;/label&gt;
&lt;input type="text" name="yourname" id="yourname" /&gt; &lt;span class="error" style="width: 180px;"&gt;&lt;/span&gt;
</code></pre>

<p>and a small fraction of the jquery that im using to validate is as follows:</p>

<pre><code>if(!isString($.trim(iName.val()))){
    iName.siblings('.error').text('Please enter your name.');
    error = true;
}
</code></pre>

<p>The bit that its getting stuck on it the siblings bit ... when i run the code, it puts the error text behind every .error span on the page, where its only meant to put it on the .error span behind the current element.</p>

<p>Any help would be great.</p>

<p>Cheers</p>
