JSFiddle - React, Tailwind, and code Playground

by Deividas Krupstas

HTML

<a id="floatbar" href="#">
    <div class="popup">Hi there</div>
    click here
</a>

CSS

#floatbar {
    position:relative;
}

.popup {
    position:absolute;
    top:10px;
    left:0px;
    height:30px;
    background:#ccc;
    display:none;
}

JavaScript

$("#floatbar").click(function(e){
    e.preventDefault();
    $(this).find(".popup").fadeIn("slow");
});