I have a list of users - approved and awaiting approval. To that I need to add the button at the bottom that unfolds the list of archived users - on top of the approved/awaiting approval lists. It should give the transition like collapsible component - folding/unfolding the div on top of the previous one. And I don't know where to start. The most obvious thing to do is:
<div class="approved_users">
</div>
<div class="archive" style="display: none">
</div>
<button type="button" id="show_archive" onclick="myFunction()">Show archive</button>
function myFunction() {
  var archive = document.getElementById("archive");
  var app = document.getElementById("approved_users");
  if (archive.style.display === "none") {
    archive.style.display = "block";
    app.style.display="none";
  } else {
    archive.style.display = "none";
    app.style.display="block";
  }
} 
But I do not know how to achive the "unfold" transformation effect.Could you help?


 
     
    