JSFiddle - React, Tailwind, and code Playground

HTML

<div class="input_field">
   <label for="username">Username</label>
   <input name="n" type="text" id="n" value="value"  />
</div>

JavaScript

$('#n').click(function() {
        $(this).parent().append('<a href="javascript:void()">&nbsp;delete</a>');
        $(this).next().click(function() {
            alert('clicked'); //this not working
        });
        $(this).blur(function() {
            $(this).next().remove();
        });
    });