Jquery selects and inputs texts
<p>I have this form:</p>

<pre><code>&lt;form ...&gt;
&lt;select name="fuits[]" id="fruits[]"&gt;
    &lt;option value="A"&gt;Apple&lt;/option&gt;
    &lt;option value="O"&gt;Orange&lt;/option&gt;
    &lt;option value="P"&gt;Pear&lt;/option&gt;   
&lt;/select&gt;
&lt;input type="text" name="fruit[]" id="fruit[]" /&gt;

&lt;select name="fruits[]" id="fruits[]"&gt;
    &lt;option value="A"&gt;Apple&lt;/option&gt;
    &lt;option value="O"&gt;Orange&lt;/option&gt;
    &lt;option value="P"&gt;Pear&lt;/option&gt;   
&lt;/select&gt;
&lt;input type="text" name="fruit[]" id="fruit[]" /&gt;

&lt;select name="fruits[]" id="fruits[]"&gt;
    &lt;option value="A"&gt;Apple&lt;/option&gt;
    &lt;option value="O"&gt;Orange&lt;/option&gt;
    &lt;option value="P"&gt;Pear&lt;/option&gt;   
&lt;/select&gt;
&lt;input type="text" name="fruit[]" id="fruit[]" /&gt;

...

&lt;input type="submit" value="send" /&gt;
</code></pre>

<p></p>

<p>So, I need fill each input text from each select option values (match input text with the selected option) </p>

<p>I have this JQuery, but it doesn't work fine =(,  </p>

<pre><code>$("select[name='type[]']").change(function() {
    $("input[name='tvalue[]']").eq($(this).index()).val(this.value);
}).change();
</code></pre>

<p>Here is the DEMO (thanks to karim79): <a href="http://jsfiddle.net/GKrd9/4/" rel="nofollow">http://jsfiddle.net/GKrd9/4/</a>
suggestions please?</p>

<p>Thanks!
Carlos</p>
