JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://labs.voronianski.com/jquery.avgrund.js/avgrund.css">
<script src="https://labs.voronianski.com/jquery.avgrund.js/style.css&quot;"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.avgrund/1.3.3/jquery.avgrund.js"></script>
        <a href="#" id="reply1" class="replyButton">
            <span>reply</span>
        </a>

JavaScript

$(function() {

             var username = "Visitor";

             $(".replyButton").on('click', function(e) {

                 if (typeof username !== 'undefined') {

                     if (username !== 'Visitor') {
                         console.log("Do some stuff");
                     }
                     else {

                         var selectedButton = $(this).attr('id');
                         selectedButton = '#' + selectedButton;
                         $(selectedButton).avgrund();
                     }
                 }

             });


         });