JSFiddle - React, Tailwind, and code Playground
HTML
status: <span id="display"></span>
<br>
<a href="#test">test</a>
<a href="#test2">test2</a>
JavaScript
$(document).ready(function(){
$('a').focus();
$('a').bind('mouseup keyup', function(e){
var msg = '';
if (e.which == 13) {
msg = 'enter pressed';
} else if (e.which == 1) {
msg = 'clicked';
}
$('#display').html( e.which + ': ' + msg );
return false;
})
})