How do i hide html until its processed with javascript?

Posted by acidzombie24 on Stack Overflow See other posts from Stack Overflow or by acidzombie24
Published on 2010-05-28T19:38:04Z Indexed on 2010/05/28 19:42 UTC
Read the original article Hit count: 193

Filed under:
|
|

I am using some JS code to transform my menu into a drilldown menu.

The problem is before it runs the JS you see a BIG UGLY mess of links. On their site its solved by putting the js at the top. Using recommendations by yahoo/YSlow i am keeping the JS files at the bottom.

I tried hiding the menu with display:none then using jquery to .show(), .css('display', ''), .css('display', 'block') and they all lead up to a messsed up looking menu (i get the title but not the title background color or any links of the menu)

How do i properly hide a div/menu and show it after being rendered?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html