JSFiddle - React, Tailwind, and code Playground

HTML

<form action="#">
<button id="myButton">My Button</button>
<input type="text" id="myText" />
</form>

JavaScript

$(document).ready(function () { 
    $('#myText').keyup(function (e) {
       alert(e.keyCode); 
    });
    
    $('#myButton').button().click(function (e) {
       alert('Button click activated!');
    });
    
    $('#myText').live("keypress", function(e) {
            if (e.keyCode == 13) {
                alert("Enter pressed");
            }
    });
});