JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <input type="text" id="test"/>
    <textarea>found me</textarea>
    <input type="text" value="hello world"/>
    
    <input type="text" value="hello world2"/>
    <input type="text" value="hello world3"/>
</div>

JavaScript

$(document).ready(function(){
    $('#test').click(function(){
        var c = $(this).next(':input').val(); 
        alert(c);
        $(this).next(':input').focus(); 
    });
});