JSFiddle - React, Tailwind, and code Playground

by vasi_32

JavaScript

var editLink = document.createElement("a");
editLink.setAttribute("class", "edit-button");
editLink.innerHTML = "Click";

window.document.body.appendChild(editLink)
$(document).ready(function(){

    $('.edit-button').click(function(event){
    event.preventDefault(); 
   alert('1')
    var docHeight = $(document).height();
    var scrollTop = $(window).scrollTop();
    $('.overlay').show().css({'top': scrollTop + 'px'});
    });
});