JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" id="test" value="press me" name="test2">

JavaScript

$(function(){
    $('#test').click(function(){
    alert('a');
    });
    
    $('input[name="test2"]').click(function(){
    alert('b');
    });
})