Search code examples
jqueryjquery-load

jquery executing menu loading before the page loads


I have an issue with the menu that I have. It's done in jquery and every time I refresh the page I can see all the levels of the menu, and then it seems like jquery starts working, and menu is formatted to look nice. I was wondering if there is a way to load that jquery before it appears on the screen.

Thank you.


Solution

  • just set the menu display to none. Then when the page loads use

    $(document).ready(function(){
      $("#menu").whatEverPlugin().show();
    });