tags:

views:

24

answers:

1

Hi, I have a div on my page - I'd like when that page is being loaded tthat Div is being hidden by jQuery's .hide method. Now I have that when a page is ready then that div is hiding - but that hiding is visible. I don't want that

Now I have that code:

$(document).ready(function(event)
{            
   $('#Div1').hide('fast');
});
+3  A: 

.hide('fast') will still animate. To do it (nearly) instantly use .hide();. However, you may still see a flicker, in which case what you want to do is append

style="display:none" 

to the element in question as part of the initial html sent. This still allows you to use jQuery's .show(); method later on if you wish.

Jamiec