JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.zachleat.com/bigtext/bigtext.js"></script>
Line One: <input id="lineOne" value="This is line one">
<select id="sizeOne" onchange="fontSize(this.value,boxOne);">
<option value="10px">10 cm</option>
<option value="20px" selected="selected">20 cm</option>
<option value="30px">30 cm</option>
</select>
<br>
Line Two: <input id="lineTwo" value="This is line two">
<select id="sizeTwo" onchange="fontSize(this.value,boxTwo);">
<option value="10px" selected="selected">10 cm</option>
<option value="20px">20 cm</option>
<option value="30px">30 cm</option>
</select>
<br>
<br>
<div style="width:700px;">
<span id="boxOne" style="font-size:20px">This is line one</span><br>
<span id="boxTwo" style="font-size:10px">This is line two</span>
</div>
<br><br>
Preview:<br>
<div class="Mainbox" style="width:400px;border:1px solid black">
<div id="boxPreviewOne">This is line one</div>
<div id="boxPreviewTwo">This is line two</div>
</div>
JavaScript
$(function () {
var update = function () {
$("#boxOne, #boxPreviewOne").text($("#lineOne")[0].value);
$("#boxTwo, #boxPreviewTwo").text($("#lineTwo")[0].value);
$(".Mainbox").bigtext();
};
$("#lineOne, #lineTwo").on("keyup", update)
update();
});