$(this).parent().remove() not working : <blockquote>
  <p>Even though this is a duplicate question of "<a href="https://stackoverflow.com/questions/15090942/event-handler-not-working-on-dynamic-content">Event handler not working on dynamic content</a>" , I am stuck with the same problem even after following the answers given there. Please help ....</p>
</blockquote>

<pre><code>    userinfo.topics.forEach(ele=&gt;{
            $("#topics_subscribed").append(`&lt;li class="list-group-item col-4"&gt;${ele} &amp;nbsp;&lt;i style="color:red;font-size:.7em;" class="removeitem fa fa-times"/&gt;&lt;/li&gt;`) ;
        });


    $(document).on('click', '.removeitem', ()=&gt; {
        console.log('clicked') ; 
        $(this).parent().remove() ; 
    });
</code></pre>

<p>Please answer why its happening before marking this as duplicate . How to fix this ? (I will remove the question as soon as its answered please....)</p>
