Hi guys, I use php to fetch a menu out of a mysql database. Basically the menu is made up of a lot of nested unordered lists (<ul>). I'm using jQuery to hide any submenu. This means that when a user visits the webpage he only sees the first <ul>. When he clicks a <li>, the submenu (again an <ul>) is shown.
This works great on my localhost. However, when I publish online I experience a problem: on page load the whole <ul> is shown for a second, including all nested <ul> submenu's, before it is hidden by jQuery. I guess this is because all <ul> elements need to be loaded into the DOM before the jQuery code is started? Is there anything I can do to solve this problem? Thanks for any advice!