I thought maybe this method was removed in the new version of jQuery 3.1.1, but connecting the old version 1.11.0 still doesn’t have a smooth appearance. What's the matter?

$(document).ready(function(){ $('div').text('Ля-ля').fadeIn(1000); }); 
 div { width: 200px; height: 300px; background: black; color: red; } 
 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <div></div> 

    1 answer 1

    Before the object appeared, it must be hidden.

     $('#block').hide().fadeIn(); 

    If the object is initially visible, the animation is skipped.

     $('#block').hide().fadeIn(); 
     #block { background:#000; color:red; } 
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="block"> text </div> 

    • Everything, everything is decided mom I g ... You can close - PeGaS
    • 2
      Our site is different from social networks. It helps to solve applied problems. Therefore, we use comments only on the case - to clarify the problem, to give constructive criticism or add useful information. To thank the author of the answer, vote for the answer or mark it as a decision. ru.stackoverflow.com/help/someone-answers - Crantisz