jQuery to find previous elements
<p>I have the following table </p>

<pre><code>&lt;table&gt;
&lt;tr class="ligneI"&gt;
&lt;td class="col2b"&gt;&lt;input type="text" id="desc" class="calcule"&gt;&lt;/td&gt;
&lt;td class="col2b"&gt;&lt;input type="text" id="price" class="calcule"&gt;&lt;/td&gt;
&lt;td class="calculated_price"&gt;220.00&lt;/td&gt;
&lt;td class="calculated_price"&gt;1800.00&lt;/td&gt;
&lt;td&gt;&lt;a title="" class="picto06 deleteLink" id="deleteLink1" href="#" onclick="resetfields(this);"&gt;delete&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="ligneI"&gt;
&lt;td class="col2b"&gt;&lt;input type="text" id="desc" class="calcule"&gt;&lt;/td&gt;
&lt;td class="col2b"&gt;&lt;input type="text" id="price" class="calcule"&gt;&lt;/td&gt;
&lt;td class="calculated_price"&gt;87.00&lt;/td&gt;
&lt;td class="calculated_price"&gt;40.00&lt;/td&gt;
&lt;td&gt;&lt;a title="" class="picto06 deleteLink" id="deleteLink2" href="#" onclick="resetfields(this);"&gt;delete&lt;/a&gt;&lt;/td&gt;
...
</code></pre>

<p>and I would like to reset the entire  when i click on a delete link.</p>

<p>I tried to do something like this:</p>

<pre><code>function resetfields(obj)
{
    $(this).parent().prevAll('td.calcule').html('&amp;nbsp;');
    $(this).parent().prevAll('td input.calcule').val('');
}
</code></pre>

<p>but only the first line erase the two first  befor my link.
Someone can help me please.</p>

<p>Ps : excuse my english</p>
