tags:

views:

217

answers:

2

Hi, I have the following code but the fadeIn and fadeOut is too fast, I can barely see it.why is that?

   $('#post_code_error').html('You Post Code is Out of Range').addClass('post_code_error').show().fadeIn('10000');



   <div id="post_code_error"></div>


   div#post_code_error {
display:none;
position:absolute;
top:300px;
right:100px;
   }

  .post_code_error {
width:100px;
height:10px;
border:1px solid #F00;
background-color: #FFC;
   color:#F60;
  }
+3  A: 

Your value for the amount of time it should take should not be a string:

$('#post_code_error').html('You Post Code is Out of Range').addClass('post_code_error').show().fadeIn(10000);
sixfoottallrabbit
+1  A: 

Remove the .show() call. This makes it appear instantly before the fadeIn() method is called. Also use an integer for the fadeIn method execution time, as opposed to a string.

Tim S. Van Haren