JSFiddle - React, Tailwind, and code Playground
by jasper
HTML
<div id="textUsername">Username</div>
<div id="textPassword">Password</div>
<a href="#">Click to Append to Both Divs Above</a>
CSS
#textUsername {
float : left;
width : 50%;
background : red;
}
#textPassword {
width : 50%;
background : green;
}
span {
display : block;
background : white;
border : 1px solid black;
margin : 0 auto;
width : 50%;
}
JavaScript
$('a').on('click', function () {
$('<span>Appended Text</span>').appendTo('#textUsername, #textPassword');
});