JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#+">click me</a>

CSS

a { display: block; }

JavaScript

$('body').delegate('a[href^="#+"]','click',function(e){
    e.preventDefault();
    $(this).parent().append('<a href="#+">click me</a>');
    console.log('clicked');
});