jQuery - Assign label text
<p>jQuery 1.7.1 - I have an array of input text elements (class - pr) and same number of array elements for label (class - err). I have some validation on blur of the text box and would like to assign a error message to the label associated with the text box. The following jQuery code is not working.</p>

<p><strong>HTML</strong></p>

<pre><code>&lt;tr&gt;
   &lt;td&gt;
            &lt;label class="err" style="display: none;" for="prd"&gt;&lt;/label&gt; 
            &lt;input type="text" class="pr" name="prd" /&gt;
    &lt;/td&gt;
 &lt;/tr&gt;
</code></pre>

<p><strong>jQuery</strong></p>

<pre><code>$("input.pr:text").blur(function(event){
    // .... validation code
    var index = $.inArray(this, $("input.pr:text"));
    $("label.err")[index].show();
    $("label.err")[index].text("Enter a number");
 });
</code></pre>
