JSFiddle - React, Tailwind, and code Playground
JavaScript
$(document).ready(function() {
$('body').html("<input type='text' id='text1' />");
});
$(document).on("keydown", "input[type=text]", function() {
alert("hi");
});
$(document).ready(function() {
$('body').html("<input type='text' id='text1' />");
});
$(document).on("keydown", "input[type=text]", function() {
alert("hi");
});