Removing elements individually from DOM
<p>I'm working on a project involving html/xml generated-qr codes and
I want to find a solution on how to delete form elements individually from the DOM. So here are the codes I have so far:</p>

<pre><code>&lt;script&gt;       
$(document).ready(function() {
    var i=0;
    $(".btn").click(function addFormField(){
    $('form#addf').append('&lt;div&gt;&lt;label class="formlb"&gt;Element '+i+':&lt;/label&gt;&lt;input                     class="forment" type="text" name="ne'+i+'" id="ne'+i+'" placeholder="entry" /&gt;&lt;a id="adv'+i+'" class="adv" data-toggle="collapse" data-target="#appr"&gt; advanced test &lt;/a&gt;&lt;div id="nft'+i+'" class="nft'+i+' hd collapse in"&gt;&lt;label class="formlb"&gt;Title:&lt;/label&gt;&lt;input class="forment" type="text" name="newtitle"  placeholder="title"/&gt;&lt;/div&gt;&lt;div id="appr" class="collapse in"&gt;&lt;input type="text" name="entry" /&gt;&lt;button class="abort" id="delete" onclick="removeFormField();"&gt;Delete Elements&lt;/button&gt;&lt;/div&gt;');   
        i++;    
        return true;
    });         
});
</code></pre>

<p></p>

<pre><code>&lt;script&gt;
$(document).ready(function() {
    $("button#delete").click(function removeFormField('id') {
        $('id').remove();   
    });
});   
&lt;/script&gt;
</code></pre>

<p>Is there any way to fix this to make it work properly?</p>
