JSFiddle - React, Tailwind, and code Playground

by jfriend00

HTML

<div id='btn'>Click this button</div>

JavaScript

$('<input type="button" value="Button">').css({ 'cursor': 'pointer' }).click(function  () { alert('clicked'); }).appendTo($('#btn'));