I want to hide and show overflow content in a div.If i click on expand bautton it expand. But i want this button should be toggle and text also be change. Thnks
function descriptionHeightMore(){
var myElement = document.querySelector(".backwhite");
myElement.style.height = "auto";
}
.backwhite{
background-color: aqua;
padding:15px;
height:50px;
overflow:hidden;
}
<div class="container">
<div class="backwhite">
<p>1. Create Ui For Email Campaign.</p>
<p>2. Create Functionality of Email Campaign</p>
<p>3. Create Keyword Display using Drag And Drop Functionality.</p>
<p>1. Create Ui For Email Campaign.</p>
<p>2. Create Functionality of Email Campaign</p>
<p>3. Create Keyword Display using Drag And Drop Functionality.</p>
<p>1. Create Ui For Email Campaign.</p>
<p>2. Create Functionality of Email Campaign</p>
<p>3. Create Keyword Display using Drag And Drop Functionality.</p>
</div>
<button type="button" class="btn btn-default btn-block" onclick="descriptionHeightMore();">Expand</button>
</div>