javascript - Hide div without showing it first -
is there way hide div without loading first, when want hide div first show 0.5sec , hide self, , animation below, looks ugly, there way avoid this, or using js wrong way?
$( document ).ready(function() { $('.errors').hide(1); $('.errors1').hide(1); }); $( document ).ready(function() { $('.errors').animate({width: 'show'},1000); $('.errors1').animate({width: 'show'},1000); });
use css
.errors, .errors1 { display: none; }
and can remove js
$( document ).ready(function() { $('.errors').hide(1); $('.errors1').hide(1); });
Comments
Post a Comment