JSFiddle - React, Tailwind, and code Playground

by g30rg3

HTML

<div class="actions"></div>

JavaScript

$(document).ready(function(){
    $("div.actions").append('<a id="excelExport" class="actionButton" alt="Export to Excel" title="Export to Excel" href="http://www.stackoverflow.com">click me</a>');
    $('div.actions').on('click.mylink', '#excelExport',function(e){
        e.preventDefault();
        callajax();
    });
    
});

function callajax() {
    alert('clicked');
    
}