I have written code to add table element and I am trying to console log the onclick function of that class that is not working
add
<div>
    <table id="con">
        <tr><td class="delete"> something</td></tr>
    </table>
</div>
<script>
    $("#a").click(function () {
        $("#con").append("<tr> <td class='delete'>something</td></tr>")
    });
    $(".delete").click(function () {
        console.log("clicked");
    })
</script>
 
    