JSFiddle - React, Tailwind, and code Playground

by Cath_kb

HTML

<div id="example">
    <span></span><input type="text"/><br/>
    <span></span><input type="text"/><br/>
</div>

JavaScript

$(function(){
    $("#example input").bind('keyup', function(){
        var index = $("#example input").index(this);
        var val = $(this).val();
        $("#example span").eq(index).text(val);
    });
});