I have the following code :
$(document).ready(function(){
  $("#add").click(function(){
    $("#content").append("<p>New text</p>");
  });
});#content{
  -webkit-transition: all .5s ease;
  -moz-transition: all .5s ease;
  transition: all .5s ease;
  padding: 15px;
  border: 1px solid black;
}<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="content">
<p>TEXT</p>
</div>
<button id="add">Add text</button>I expect when I click on the button add, the content div will have a transition when he expand. I have tried with the following animation css :
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
transition: all .5s ease;
I would like to add a transition to the div
I also tried with .show('slow');
 
    