jQuery remove the nearlest P tag
<p>i have this jquery code</p>

<pre><code>$("#eioShowLink").on('click',function(){
        $("#ioEditRelatedConcepts").html('');
        $.getJSON("http://localhost/Mar7ba/Ontology/getRelatedConceptsAndRelations/"+conceptName+"/TRUE", function(data){
            var concepts = data[0];
            var relations = data[1];
            for(var i = 0 ; i &lt; concepts.length ; i++){
                (function(currentConcept, currentRelation) {
                    $.getJSON("http://localhost/Mar7ba/InformationObject/getIOsForConcept/"+currentConcept+"/TRUE" , function(data1){
                        var IOS = '';
                        IOS +="&lt;option&gt;Select IO&lt;/option&gt;";
                        for(var j=0;j&lt;data1.length;j++){
                            IOS+="&lt;option&gt;"+data1[j]+"&lt;/option&gt;";
                        }
                        $("#ioEditRelatedConcepts").append('&lt;p&gt;\n\
              connect to\n\
              &lt;span class="ioAddConcept"&gt;'+ currentConcept +'&lt;/span&gt;\n\
              with\n\
              &lt;span class="ioAddRelation"&gt;'+ currentRelation +'&lt;/span&gt;\n\
              &lt;select name ="concetedIOs[]" class="TypeSelector"&gt;'+IOS+'&lt;/select&gt;\n\
              &lt;span class="errorMessage"&gt;&lt;/span&gt;\n\
              &lt;a href="#" class="removeA" id="eioRemoveIO"&gt;remove&lt;/a&gt;\n\
              &lt;/p&gt;\n\
              &lt;p&gt;');
                    });
                })(concepts[i], relations[i]);
            }
        });

    });
</code></pre>

<p>it works good, now i want when press the link "eioremoveIO" i want to remove the nearlest P tag, so i tried this</p>

<pre><code>$("#editOnePlace").on('click','#eioRemoveIO',function(){
    $(this).closest('p').remove();
});
</code></pre>

<p>but nothing happen when pressing, it seems that it doesn't even fired, would you tell me what am i doing wrong?</p>

<h3>edit</h3>

<p><code>#editOnePlace"</code> is the id of my div(doesn't appear here)</p>

<h3>edit</h3>

<p>the html</p>

<pre><code> &lt;li&gt;
                &lt;p&gt;
                    &lt;label&gt;Concepts&lt;/label&gt;
                    &lt;a href="#" class="smallLink" id="eioShowLink"&gt;Show Concepts&lt;/a&gt;
                &lt;/p&gt;
                &lt;div id="ioEditRelatedConcepts"&gt;
                &lt;/div&gt;
            &lt;/li&gt;
</code></pre>
