JSFiddle - React, Tailwind, and code Playground
HTML
<div id="parent_div">
<span class="parenttexthere">Parent Div Text </span>
<div id="child_div" >
<span class="childtexthere">Child Div Text </span>
</div>
</div>
<br/>
<button> Refresh</button>
CSS
#parent_div{
height:150px;
width:100%;
background-color:green;
}
span{
color:white;
}
#child_div{
height:75%;
width:100%;
background-color:red;
}
JavaScript
var i=1;
$('button').on('click',function(){
var data="Parent Div Data Changed "+i+ " times";
$("#parent_div .parenttexthere").hide().html(data).fadeIn('fast');
i++;
});