JSFiddle - React, Tailwind, and code Playground

HTML

<div class="form-group col-4" style="margin-bottom: 20px;">
 
  <input type="text"><br/>
  <button type="button">
  Click
  </button>
  <br/>
  <span id="result"></span>
</div>

CSS

https://jsfiddle.net/o2jrm369/#

JavaScript

$(document).ready(function(){
  $(document).on('keypress click', function(e){
    if (e.which === 32 || e.type === 'click') {
     console.log("which "+ e.which);
      console.log("Type "+ e.type);
      $("#result").html(" which "+ e.which + " Type "+ e.type);
      console.log($(this));
    }
  });
})