JSFiddle - React, Tailwind, and code Playground
by devcurry_com
HTML
<div id="divOne">This is a simple looking DIV</div><br />
<div id="divTwo">This is another simple looking DIV</div><br />
<input id="btnHtml" type="button" value=".html()" />
<input id="btnText" type="button" value=".text()" />
<br/><br/>
Demo by <a href="http://www.devcurry.com/search/label/jQuery">DevCurry.com</a>
CSS
.colorDiv { color:blue; }
JavaScript
$(function () {
$("#btnHtml").click(function () {
$("#divOne")
.html('<span class="colorDiv">HTML and Content gets changed</span>');
});
$("#btnText").click(function () {
$("#divTwo").text('Only Content gets changed');
});
});