JSFiddle - React, Tailwind, and code Playground
by Gabriele Petrioli
HTML
<div id="more_time">Weekdays 7:00am - 9:00am - More Time</div>
<br>
<br>
<div id="list_times"></div>
CSS
#more_time {
cursor:pointer;
}
JavaScript
jQuery(document).ready(function () {
var count = 0;
$("#more_time").click(function () {
count += 1;
$("#list_times").append($("#more_time").text() + " - <span id='remove_" + count + "' class='remove' style='cursor:pointer; '>(remove)</span><br>");
});
$("#list_times").on("click", '.remove', function () {
alert("Hello");
});
});