JSFiddle - React, Tailwind, and code Playground

HTML

<span class="add">add</span>
<span id="spin"></span>

JavaScript

$(function(){
    var NewContent='<div class="added">Added</div>'
    $(".add").click(function(){
        $("#spin").after(NewContent);
    });
});

//1. I'm trying to click add and the content of add will appear for the first time.

//2. After it's added, I want to click add and it will only toggle "added", instead of adding "added" on each click