There is a button with a click on which the block appears and disappears. Question: how to make the appearance-fade smooth?

function toggle(el) { el.style.display = (el.style.display == 'none') ? '' : 'none' } 
 #hidden_content { display: none; } 
 <button class="order-call" onclick="toggle(hidden_content)">Заказать звонок</button> <div id="hidden_content">hidden_content</div> 

    1 answer 1

     $(".order-call").click(() => { $("#hidden_content").toggle("slow"); }) 
     #hidden_content { display: none; } 
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button class="order-call">Заказать звонок</button> <div id="hidden_content">hidden_content</div>