JSFiddle - React, Tailwind, and code Playground

by chovy

HTML

<div>
    <a href="#">click me</a>
    <textarea>Foo</textarea>
</div>

JavaScript

//attache the click event to the anchor tag
$("a").click(function(e){
    //prevent the default behaviour of following the link
    e.preventDefault();
    
    //find the textarea element, and after it, put an input tag
    $("textarea").after('<input type="submit" value="Foo" />');
});