JSFiddle - React, Tailwind, and code Playground

HTML

<p id="submit">
    submit
</p>
<div id="parent">

</div>
<!--
http://stackoverflow.com/questions/35267790/page-becomes-unresponsive-after-some-time
-->

JavaScript

function showAllData() {
    console.log('in showAllData');

    $('#child').remove();
    $('#parent').append($('<ul id="child"></ul>'));

    var html = `<li>foo</li>
    <li>bar</li>
    <li>shizzle</li>`;

    $('#child').append($(html));
}

$('#parent').on('click', '#child', function() {
    console.log('in li click handler');
    removeTag();
});

$('#submit').click(function(e) {
    console.log('underway...');
    showAllData();
});

function removeTag() {
    console.log('in removeTag');
    showAllData();
}