delete specific entries
<p>I'm creating a jquery script that could create new form fields, i can create them but how can i delete the specific entries (referenced by class name class="inimene_'+count+'")</p>

<pre><code>&lt;script&gt;
var count = 0;
function add(){
count ++;
var code = '&lt;div class="inimene_'+count+'"&gt;&lt;p&gt;Eesnimi: &lt;input type="text" id="eesnimi_'+count+'" /&gt;&lt;/br&gt;Perenimi: &lt;input type="text" id="perenimi_'+count+'" /&gt;&lt;/br&gt;Pilet: &lt;select&gt;&lt;option selected&gt;Vali pileti liik&lt;/option&gt;&lt;option value="100.00 Kr"&gt;Täiskasvanu&lt;/option&gt;&lt;option value="25.00 Kr"&gt;Õpilane 5-12kl&lt;/option&gt;&lt;option value="3"&gt;Laps kuni 4kl&lt;/option&gt;&lt;/select&gt;Summa: &lt;input type="text" id="summa_'+count+'" /&gt; Linn/Maakond &lt;input type="text" id="linn_'+count+'" /&gt; Rivi: &lt;input type="checkbox" id="rivi_'+count+'" /&gt;&lt;input type="button" id="kustuta" onclick="delete()" value="Kustuta" /&gt;&lt;/p&gt;&lt;/div&gt;'
$('#container').append(code)
$('#val').val(count)
}
function delete(){
$('.inimene:last').remove();
}
 $(document).ready(function(){
 $('.add').click(add)
});
&lt;/script&gt;
</code></pre>
