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); }); 

js fiddle demo


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -