JSFiddle - React, Tailwind, and code Playground
by Roman
HTML
<div>
<span id="st1">...</span> - <span id="st2">...</span>
</div>
<input type="text" id="stack1"/>
-
<input type="text" id="stack2"/>
JavaScript
$(function(){
$('#stack1').on('keydown', function(){
$('#st1').text( $(this).val()||'...' );
});
$('#stack2').on('keydown', function(){
$('#st2').text( $(this).val()||'...' );
});
});